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
@@ -16,17 +16,17 @@ from azure.core.exceptions import (
|
|
16
16
|
ResourceExistsError,
|
17
17
|
ResourceNotFoundError,
|
18
18
|
ResourceNotModifiedError,
|
19
|
+
StreamClosedError,
|
20
|
+
StreamConsumedError,
|
19
21
|
map_error,
|
20
22
|
)
|
21
23
|
from azure.core.pipeline import PipelineResponse
|
22
|
-
from azure.core.
|
23
|
-
from azure.core.rest import HttpRequest
|
24
|
+
from azure.core.rest import HttpRequest, HttpResponse
|
24
25
|
from azure.core.tracing.decorator import distributed_trace
|
25
26
|
from azure.core.utils import case_insensitive_dict
|
26
27
|
|
27
28
|
from .. import models as _models
|
28
29
|
from .._serialization import Serializer
|
29
|
-
from .._vendor import _convert_request
|
30
30
|
|
31
31
|
if sys.version_info >= (3, 9):
|
32
32
|
from collections.abc import MutableMapping
|
@@ -49,6 +49,7 @@ def build_download_request(
|
|
49
49
|
lease_id: Optional[str] = None,
|
50
50
|
range_get_content_md5: Optional[bool] = None,
|
51
51
|
range_get_content_crc64: Optional[bool] = None,
|
52
|
+
structured_body_type: Optional[str] = None,
|
52
53
|
encryption_key: Optional[str] = None,
|
53
54
|
encryption_key_sha256: Optional[str] = None,
|
54
55
|
encryption_algorithm: Optional[Union[str, _models.EncryptionAlgorithmType]] = None,
|
@@ -63,7 +64,7 @@ def build_download_request(
|
|
63
64
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
64
65
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
65
66
|
|
66
|
-
version: Literal["
|
67
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
67
68
|
accept = _headers.pop("Accept", "application/xml")
|
68
69
|
|
69
70
|
# Construct URL
|
@@ -95,6 +96,8 @@ def build_download_request(
|
|
95
96
|
_headers["x-ms-range-get-content-crc64"] = _SERIALIZER.header(
|
96
97
|
"range_get_content_crc64", range_get_content_crc64, "bool"
|
97
98
|
)
|
99
|
+
if structured_body_type is not None:
|
100
|
+
_headers["x-ms-structured-body"] = _SERIALIZER.header("structured_body_type", structured_body_type, "str")
|
98
101
|
if encryption_key is not None:
|
99
102
|
_headers["x-ms-encryption-key"] = _SERIALIZER.header("encryption_key", encryption_key, "str")
|
100
103
|
if encryption_key_sha256 is not None:
|
@@ -142,7 +145,7 @@ def build_get_properties_request(
|
|
142
145
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
143
146
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
144
147
|
|
145
|
-
version: Literal["
|
148
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
146
149
|
accept = _headers.pop("Accept", "application/xml")
|
147
150
|
|
148
151
|
# Construct URL
|
@@ -210,7 +213,7 @@ def build_delete_request(
|
|
210
213
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
211
214
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
212
215
|
|
213
|
-
version: Literal["
|
216
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
214
217
|
accept = _headers.pop("Accept", "application/xml")
|
215
218
|
|
216
219
|
# Construct URL
|
@@ -261,7 +264,7 @@ def build_undelete_request(
|
|
261
264
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
262
265
|
|
263
266
|
comp: Literal["undelete"] = kwargs.pop("comp", _params.pop("comp", "undelete"))
|
264
|
-
version: Literal["
|
267
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
265
268
|
accept = _headers.pop("Accept", "application/xml")
|
266
269
|
|
267
270
|
# Construct URL
|
@@ -299,7 +302,7 @@ def build_set_expiry_request(
|
|
299
302
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
300
303
|
|
301
304
|
comp: Literal["expiry"] = kwargs.pop("comp", _params.pop("comp", "expiry"))
|
302
|
-
version: Literal["
|
305
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
303
306
|
accept = _headers.pop("Accept", "application/xml")
|
304
307
|
|
305
308
|
# Construct URL
|
@@ -350,7 +353,7 @@ def build_set_http_headers_request(
|
|
350
353
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
351
354
|
|
352
355
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
353
|
-
version: Literal["
|
356
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
354
357
|
accept = _headers.pop("Accept", "application/xml")
|
355
358
|
|
356
359
|
# Construct URL
|
@@ -413,13 +416,15 @@ def build_set_immutability_policy_request(
|
|
413
416
|
if_unmodified_since: Optional[datetime.datetime] = None,
|
414
417
|
immutability_policy_expiry: Optional[datetime.datetime] = None,
|
415
418
|
immutability_policy_mode: Optional[Union[str, _models.BlobImmutabilityPolicyMode]] = None,
|
419
|
+
snapshot: Optional[str] = None,
|
420
|
+
version_id: Optional[str] = None,
|
416
421
|
**kwargs: Any
|
417
422
|
) -> HttpRequest:
|
418
423
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
419
424
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
420
425
|
|
421
426
|
comp: Literal["immutabilityPolicies"] = kwargs.pop("comp", _params.pop("comp", "immutabilityPolicies"))
|
422
|
-
version: Literal["
|
427
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
423
428
|
accept = _headers.pop("Accept", "application/xml")
|
424
429
|
|
425
430
|
# Construct URL
|
@@ -434,6 +439,10 @@ def build_set_immutability_policy_request(
|
|
434
439
|
_params["comp"] = _SERIALIZER.query("comp", comp, "str")
|
435
440
|
if timeout is not None:
|
436
441
|
_params["timeout"] = _SERIALIZER.query("timeout", timeout, "int", minimum=0)
|
442
|
+
if snapshot is not None:
|
443
|
+
_params["snapshot"] = _SERIALIZER.query("snapshot", snapshot, "str")
|
444
|
+
if version_id is not None:
|
445
|
+
_params["versionid"] = _SERIALIZER.query("version_id", version_id, "str")
|
437
446
|
|
438
447
|
# Construct headers
|
439
448
|
_headers["x-ms-version"] = _SERIALIZER.header("version", version, "str")
|
@@ -455,13 +464,19 @@ def build_set_immutability_policy_request(
|
|
455
464
|
|
456
465
|
|
457
466
|
def build_delete_immutability_policy_request(
|
458
|
-
url: str,
|
467
|
+
url: str,
|
468
|
+
*,
|
469
|
+
timeout: Optional[int] = None,
|
470
|
+
request_id_parameter: Optional[str] = None,
|
471
|
+
snapshot: Optional[str] = None,
|
472
|
+
version_id: Optional[str] = None,
|
473
|
+
**kwargs: Any
|
459
474
|
) -> HttpRequest:
|
460
475
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
461
476
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
462
477
|
|
463
478
|
comp: Literal["immutabilityPolicies"] = kwargs.pop("comp", _params.pop("comp", "immutabilityPolicies"))
|
464
|
-
version: Literal["
|
479
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
465
480
|
accept = _headers.pop("Accept", "application/xml")
|
466
481
|
|
467
482
|
# Construct URL
|
@@ -476,6 +491,10 @@ def build_delete_immutability_policy_request(
|
|
476
491
|
_params["comp"] = _SERIALIZER.query("comp", comp, "str")
|
477
492
|
if timeout is not None:
|
478
493
|
_params["timeout"] = _SERIALIZER.query("timeout", timeout, "int", minimum=0)
|
494
|
+
if snapshot is not None:
|
495
|
+
_params["snapshot"] = _SERIALIZER.query("snapshot", snapshot, "str")
|
496
|
+
if version_id is not None:
|
497
|
+
_params["versionid"] = _SERIALIZER.query("version_id", version_id, "str")
|
479
498
|
|
480
499
|
# Construct headers
|
481
500
|
_headers["x-ms-version"] = _SERIALIZER.header("version", version, "str")
|
@@ -492,13 +511,15 @@ def build_set_legal_hold_request(
|
|
492
511
|
legal_hold: bool,
|
493
512
|
timeout: Optional[int] = None,
|
494
513
|
request_id_parameter: Optional[str] = None,
|
514
|
+
snapshot: Optional[str] = None,
|
515
|
+
version_id: Optional[str] = None,
|
495
516
|
**kwargs: Any
|
496
517
|
) -> HttpRequest:
|
497
518
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
498
519
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
499
520
|
|
500
521
|
comp: Literal["legalhold"] = kwargs.pop("comp", _params.pop("comp", "legalhold"))
|
501
|
-
version: Literal["
|
522
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
502
523
|
accept = _headers.pop("Accept", "application/xml")
|
503
524
|
|
504
525
|
# Construct URL
|
@@ -513,6 +534,10 @@ def build_set_legal_hold_request(
|
|
513
534
|
_params["comp"] = _SERIALIZER.query("comp", comp, "str")
|
514
535
|
if timeout is not None:
|
515
536
|
_params["timeout"] = _SERIALIZER.query("timeout", timeout, "int", minimum=0)
|
537
|
+
if snapshot is not None:
|
538
|
+
_params["snapshot"] = _SERIALIZER.query("snapshot", snapshot, "str")
|
539
|
+
if version_id is not None:
|
540
|
+
_params["versionid"] = _SERIALIZER.query("version_id", version_id, "str")
|
516
541
|
|
517
542
|
# Construct headers
|
518
543
|
_headers["x-ms-version"] = _SERIALIZER.header("version", version, "str")
|
@@ -546,7 +571,7 @@ def build_set_metadata_request(
|
|
546
571
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
547
572
|
|
548
573
|
comp: Literal["metadata"] = kwargs.pop("comp", _params.pop("comp", "metadata"))
|
549
|
-
version: Literal["
|
574
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
550
575
|
accept = _headers.pop("Accept", "application/xml")
|
551
576
|
|
552
577
|
# Construct URL
|
@@ -614,7 +639,7 @@ def build_acquire_lease_request(
|
|
614
639
|
|
615
640
|
comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
|
616
641
|
action: Literal["acquire"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "acquire"))
|
617
|
-
version: Literal["
|
642
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
618
643
|
accept = _headers.pop("Accept", "application/xml")
|
619
644
|
|
620
645
|
# Construct URL
|
@@ -672,7 +697,7 @@ def build_release_lease_request(
|
|
672
697
|
|
673
698
|
comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
|
674
699
|
action: Literal["release"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "release"))
|
675
|
-
version: Literal["
|
700
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
676
701
|
accept = _headers.pop("Accept", "application/xml")
|
677
702
|
|
678
703
|
# Construct URL
|
@@ -727,7 +752,7 @@ def build_renew_lease_request(
|
|
727
752
|
|
728
753
|
comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
|
729
754
|
action: Literal["renew"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "renew"))
|
730
|
-
version: Literal["
|
755
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
731
756
|
accept = _headers.pop("Accept", "application/xml")
|
732
757
|
|
733
758
|
# Construct URL
|
@@ -783,7 +808,7 @@ def build_change_lease_request(
|
|
783
808
|
|
784
809
|
comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
|
785
810
|
action: Literal["change"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "change"))
|
786
|
-
version: Literal["
|
811
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
787
812
|
accept = _headers.pop("Accept", "application/xml")
|
788
813
|
|
789
814
|
# Construct URL
|
@@ -839,7 +864,7 @@ def build_break_lease_request(
|
|
839
864
|
|
840
865
|
comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
|
841
866
|
action: Literal["break"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "break"))
|
842
|
-
version: Literal["
|
867
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
843
868
|
accept = _headers.pop("Accept", "application/xml")
|
844
869
|
|
845
870
|
# Construct URL
|
@@ -899,7 +924,7 @@ def build_create_snapshot_request(
|
|
899
924
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
900
925
|
|
901
926
|
comp: Literal["snapshot"] = kwargs.pop("comp", _params.pop("comp", "snapshot"))
|
902
|
-
version: Literal["
|
927
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
903
928
|
accept = _headers.pop("Accept", "application/xml")
|
904
929
|
|
905
930
|
# Construct URL
|
@@ -978,7 +1003,7 @@ def build_start_copy_from_url_request(
|
|
978
1003
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
979
1004
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
980
1005
|
|
981
|
-
version: Literal["
|
1006
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
982
1007
|
accept = _headers.pop("Accept", "application/xml")
|
983
1008
|
|
984
1009
|
# Construct URL
|
@@ -1081,7 +1106,7 @@ def build_copy_from_url_request(
|
|
1081
1106
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
1082
1107
|
|
1083
1108
|
x_ms_requires_sync: Literal["true"] = kwargs.pop("x_ms_requires_sync", _headers.pop("x-ms-requires-sync", "true"))
|
1084
|
-
version: Literal["
|
1109
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1085
1110
|
accept = _headers.pop("Accept", "application/xml")
|
1086
1111
|
|
1087
1112
|
# Construct URL
|
@@ -1173,7 +1198,7 @@ def build_abort_copy_from_url_request(
|
|
1173
1198
|
copy_action_abort_constant: Literal["abort"] = kwargs.pop(
|
1174
1199
|
"copy_action_abort_constant", _headers.pop("x-ms-copy-action", "abort")
|
1175
1200
|
)
|
1176
|
-
version: Literal["
|
1201
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1177
1202
|
accept = _headers.pop("Accept", "application/xml")
|
1178
1203
|
|
1179
1204
|
# Construct URL
|
@@ -1219,7 +1244,7 @@ def build_set_tier_request(
|
|
1219
1244
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
1220
1245
|
|
1221
1246
|
comp: Literal["tier"] = kwargs.pop("comp", _params.pop("comp", "tier"))
|
1222
|
-
version: Literal["
|
1247
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1223
1248
|
accept = _headers.pop("Accept", "application/xml")
|
1224
1249
|
|
1225
1250
|
# Construct URL
|
@@ -1263,7 +1288,7 @@ def build_get_account_info_request(
|
|
1263
1288
|
|
1264
1289
|
restype: Literal["account"] = kwargs.pop("restype", _params.pop("restype", "account"))
|
1265
1290
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
1266
|
-
version: Literal["
|
1291
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1267
1292
|
accept = _headers.pop("Accept", "application/xml")
|
1268
1293
|
|
1269
1294
|
# Construct URL
|
@@ -1312,7 +1337,7 @@ def build_query_request(
|
|
1312
1337
|
|
1313
1338
|
comp: Literal["query"] = kwargs.pop("comp", _params.pop("comp", "query"))
|
1314
1339
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
1315
|
-
version: Literal["
|
1340
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1316
1341
|
accept = _headers.pop("Accept", "application/xml")
|
1317
1342
|
|
1318
1343
|
# Construct URL
|
@@ -1376,7 +1401,7 @@ def build_get_tags_request(
|
|
1376
1401
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
1377
1402
|
|
1378
1403
|
comp: Literal["tags"] = kwargs.pop("comp", _params.pop("comp", "tags"))
|
1379
|
-
version: Literal["
|
1404
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1380
1405
|
accept = _headers.pop("Accept", "application/xml")
|
1381
1406
|
|
1382
1407
|
# Construct URL
|
@@ -1427,7 +1452,7 @@ def build_set_tags_request(
|
|
1427
1452
|
|
1428
1453
|
comp: Literal["tags"] = kwargs.pop("comp", _params.pop("comp", "tags"))
|
1429
1454
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
1430
|
-
version: Literal["
|
1455
|
+
version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
|
1431
1456
|
accept = _headers.pop("Accept", "application/xml")
|
1432
1457
|
|
1433
1458
|
# Construct URL
|
@@ -1496,12 +1521,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1496
1521
|
range: Optional[str] = None,
|
1497
1522
|
range_get_content_md5: Optional[bool] = None,
|
1498
1523
|
range_get_content_crc64: Optional[bool] = None,
|
1524
|
+
structured_body_type: Optional[str] = None,
|
1499
1525
|
request_id_parameter: Optional[str] = None,
|
1500
1526
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
1501
1527
|
cpk_info: Optional[_models.CpkInfo] = None,
|
1502
1528
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1503
1529
|
**kwargs: Any
|
1504
1530
|
) -> Iterator[bytes]:
|
1531
|
+
# pylint: disable=line-too-long
|
1505
1532
|
"""The Download operation reads or downloads a blob from the system, including its metadata and
|
1506
1533
|
properties. You can also call Download to read a snapshot.
|
1507
1534
|
|
@@ -1530,6 +1557,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1530
1557
|
service returns the CRC64 hash for the range, as long as the range is less than or equal to 4
|
1531
1558
|
MB in size. Default value is None.
|
1532
1559
|
:type range_get_content_crc64: bool
|
1560
|
+
:param structured_body_type: Specifies the response content should be returned as a structured
|
1561
|
+
message and specifies the message schema version and properties. Default value is None.
|
1562
|
+
:type structured_body_type: str
|
1533
1563
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
1534
1564
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
1535
1565
|
value is None.
|
@@ -1544,7 +1574,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1544
1574
|
:rtype: Iterator[bytes]
|
1545
1575
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1546
1576
|
"""
|
1547
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1577
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1548
1578
|
401: ClientAuthenticationError,
|
1549
1579
|
404: ResourceNotFoundError,
|
1550
1580
|
409: ResourceExistsError,
|
@@ -1588,6 +1618,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1588
1618
|
lease_id=_lease_id,
|
1589
1619
|
range_get_content_md5=range_get_content_md5,
|
1590
1620
|
range_get_content_crc64=range_get_content_crc64,
|
1621
|
+
structured_body_type=structured_body_type,
|
1591
1622
|
encryption_key=_encryption_key,
|
1592
1623
|
encryption_key_sha256=_encryption_key_sha256,
|
1593
1624
|
encryption_algorithm=_encryption_algorithm,
|
@@ -1601,9 +1632,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1601
1632
|
headers=_headers,
|
1602
1633
|
params=_params,
|
1603
1634
|
)
|
1604
|
-
_request = _convert_request(_request)
|
1605
1635
|
_request.url = self._client.format_url(_request.url)
|
1606
1636
|
|
1637
|
+
_decompress = kwargs.pop("decompress", True)
|
1607
1638
|
_stream = True
|
1608
1639
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1609
1640
|
_request, stream=_stream, **kwargs
|
@@ -1612,6 +1643,10 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1612
1643
|
response = pipeline_response.http_response
|
1613
1644
|
|
1614
1645
|
if response.status_code not in [200, 206]:
|
1646
|
+
try:
|
1647
|
+
response.read() # Load the body in memory and close the socket
|
1648
|
+
except (StreamConsumedError, StreamClosedError):
|
1649
|
+
pass
|
1615
1650
|
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
1616
1651
|
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
|
1617
1652
|
raise HttpResponseError(response=response, model=error)
|
@@ -1695,8 +1730,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1695
1730
|
"str", response.headers.get("x-ms-immutability-policy-mode")
|
1696
1731
|
)
|
1697
1732
|
response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
|
1698
|
-
|
1699
|
-
|
1733
|
+
response_headers["x-ms-structured-body"] = self._deserialize(
|
1734
|
+
"str", response.headers.get("x-ms-structured-body")
|
1735
|
+
)
|
1736
|
+
response_headers["x-ms-structured-content-length"] = self._deserialize(
|
1737
|
+
"int", response.headers.get("x-ms-structured-content-length")
|
1738
|
+
)
|
1700
1739
|
|
1701
1740
|
if response.status_code == 206:
|
1702
1741
|
response_headers["Last-Modified"] = self._deserialize("rfc-1123", response.headers.get("Last-Modified"))
|
@@ -1779,8 +1818,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1779
1818
|
"str", response.headers.get("x-ms-immutability-policy-mode")
|
1780
1819
|
)
|
1781
1820
|
response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
|
1821
|
+
response_headers["x-ms-structured-body"] = self._deserialize(
|
1822
|
+
"str", response.headers.get("x-ms-structured-body")
|
1823
|
+
)
|
1824
|
+
response_headers["x-ms-structured-content-length"] = self._deserialize(
|
1825
|
+
"int", response.headers.get("x-ms-structured-content-length")
|
1826
|
+
)
|
1782
1827
|
|
1783
|
-
|
1828
|
+
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
|
1784
1829
|
|
1785
1830
|
if cls:
|
1786
1831
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -1799,6 +1844,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1799
1844
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1800
1845
|
**kwargs: Any
|
1801
1846
|
) -> None:
|
1847
|
+
# pylint: disable=line-too-long
|
1802
1848
|
"""The Get Properties operation returns all user-defined metadata, standard HTTP properties, and
|
1803
1849
|
system properties for the blob. It does not return the content of the blob.
|
1804
1850
|
|
@@ -1831,7 +1877,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1831
1877
|
:rtype: None
|
1832
1878
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1833
1879
|
"""
|
1834
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
1880
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
1835
1881
|
401: ClientAuthenticationError,
|
1836
1882
|
404: ResourceNotFoundError,
|
1837
1883
|
409: ResourceExistsError,
|
@@ -1885,7 +1931,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
1885
1931
|
headers=_headers,
|
1886
1932
|
params=_params,
|
1887
1933
|
)
|
1888
|
-
_request = _convert_request(_request)
|
1889
1934
|
_request.url = self._client.format_url(_request.url)
|
1890
1935
|
|
1891
1936
|
_stream = False
|
@@ -2003,6 +2048,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2003
2048
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2004
2049
|
**kwargs: Any
|
2005
2050
|
) -> None:
|
2051
|
+
# pylint: disable=line-too-long
|
2006
2052
|
"""If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
|
2007
2053
|
permanently removed from the storage account. If the storage account's soft delete feature is
|
2008
2054
|
enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible
|
@@ -2052,7 +2098,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2052
2098
|
:rtype: None
|
2053
2099
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2054
2100
|
"""
|
2055
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2101
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2056
2102
|
401: ClientAuthenticationError,
|
2057
2103
|
404: ResourceNotFoundError,
|
2058
2104
|
409: ResourceExistsError,
|
@@ -2098,7 +2144,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2098
2144
|
headers=_headers,
|
2099
2145
|
params=_params,
|
2100
2146
|
)
|
2101
|
-
_request = _convert_request(_request)
|
2102
2147
|
_request.url = self._client.format_url(_request.url)
|
2103
2148
|
|
2104
2149
|
_stream = False
|
@@ -2128,6 +2173,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2128
2173
|
def undelete( # pylint: disable=inconsistent-return-statements
|
2129
2174
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
2130
2175
|
) -> None:
|
2176
|
+
# pylint: disable=line-too-long
|
2131
2177
|
"""Undelete a blob that was previously soft deleted.
|
2132
2178
|
|
2133
2179
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -2143,7 +2189,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2143
2189
|
:rtype: None
|
2144
2190
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2145
2191
|
"""
|
2146
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2192
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2147
2193
|
401: ClientAuthenticationError,
|
2148
2194
|
404: ResourceNotFoundError,
|
2149
2195
|
409: ResourceExistsError,
|
@@ -2166,7 +2212,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2166
2212
|
headers=_headers,
|
2167
2213
|
params=_params,
|
2168
2214
|
)
|
2169
|
-
_request = _convert_request(_request)
|
2170
2215
|
_request.url = self._client.format_url(_request.url)
|
2171
2216
|
|
2172
2217
|
_stream = False
|
@@ -2201,6 +2246,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2201
2246
|
expires_on: Optional[str] = None,
|
2202
2247
|
**kwargs: Any
|
2203
2248
|
) -> None:
|
2249
|
+
# pylint: disable=line-too-long
|
2204
2250
|
"""Sets the time a blob will expire and be deleted.
|
2205
2251
|
|
2206
2252
|
:param expiry_options: Required. Indicates mode of the expiry time. Known values are:
|
@@ -2221,7 +2267,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2221
2267
|
:rtype: None
|
2222
2268
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2223
2269
|
"""
|
2224
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2270
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2225
2271
|
401: ClientAuthenticationError,
|
2226
2272
|
404: ResourceNotFoundError,
|
2227
2273
|
409: ResourceExistsError,
|
@@ -2246,7 +2292,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2246
2292
|
headers=_headers,
|
2247
2293
|
params=_params,
|
2248
2294
|
)
|
2249
|
-
_request = _convert_request(_request)
|
2250
2295
|
_request.url = self._client.format_url(_request.url)
|
2251
2296
|
|
2252
2297
|
_stream = False
|
@@ -2284,6 +2329,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2284
2329
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2285
2330
|
**kwargs: Any
|
2286
2331
|
) -> None:
|
2332
|
+
# pylint: disable=line-too-long
|
2287
2333
|
"""The Set HTTP Headers operation sets system properties on the blob.
|
2288
2334
|
|
2289
2335
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -2305,7 +2351,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2305
2351
|
:rtype: None
|
2306
2352
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2307
2353
|
"""
|
2308
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2354
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2309
2355
|
401: ClientAuthenticationError,
|
2310
2356
|
404: ResourceNotFoundError,
|
2311
2357
|
409: ResourceExistsError,
|
@@ -2368,7 +2414,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2368
2414
|
headers=_headers,
|
2369
2415
|
params=_params,
|
2370
2416
|
)
|
2371
|
-
_request = _convert_request(_request)
|
2372
2417
|
_request.url = self._client.format_url(_request.url)
|
2373
2418
|
|
2374
2419
|
_stream = False
|
@@ -2406,9 +2451,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2406
2451
|
request_id_parameter: Optional[str] = None,
|
2407
2452
|
immutability_policy_expiry: Optional[datetime.datetime] = None,
|
2408
2453
|
immutability_policy_mode: Optional[Union[str, _models.BlobImmutabilityPolicyMode]] = None,
|
2454
|
+
snapshot: Optional[str] = None,
|
2455
|
+
version_id: Optional[str] = None,
|
2409
2456
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2410
2457
|
**kwargs: Any
|
2411
2458
|
) -> None:
|
2459
|
+
# pylint: disable=line-too-long
|
2412
2460
|
"""The Set Immutability Policy operation sets the immutability policy on the blob.
|
2413
2461
|
|
2414
2462
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -2426,13 +2474,23 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2426
2474
|
:param immutability_policy_mode: Specifies the immutability policy mode to set on the blob.
|
2427
2475
|
Known values are: "Mutable", "Unlocked", and "Locked". Default value is None.
|
2428
2476
|
:type immutability_policy_mode: str or ~azure.storage.blob.models.BlobImmutabilityPolicyMode
|
2477
|
+
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
2478
|
+
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
2479
|
+
see :code:`<a
|
2480
|
+
href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
|
2481
|
+
a Snapshot of a Blob.</a>`. Default value is None.
|
2482
|
+
:type snapshot: str
|
2483
|
+
:param version_id: The version id parameter is an opaque DateTime value that, when present,
|
2484
|
+
specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
|
2485
|
+
Default value is None.
|
2486
|
+
:type version_id: str
|
2429
2487
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2430
2488
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2431
2489
|
:return: None or the result of cls(response)
|
2432
2490
|
:rtype: None
|
2433
2491
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2434
2492
|
"""
|
2435
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2493
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2436
2494
|
401: ClientAuthenticationError,
|
2437
2495
|
404: ResourceNotFoundError,
|
2438
2496
|
409: ResourceExistsError,
|
@@ -2457,12 +2515,13 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2457
2515
|
if_unmodified_since=_if_unmodified_since,
|
2458
2516
|
immutability_policy_expiry=immutability_policy_expiry,
|
2459
2517
|
immutability_policy_mode=immutability_policy_mode,
|
2518
|
+
snapshot=snapshot,
|
2519
|
+
version_id=version_id,
|
2460
2520
|
comp=comp,
|
2461
2521
|
version=self._config.version,
|
2462
2522
|
headers=_headers,
|
2463
2523
|
params=_params,
|
2464
2524
|
)
|
2465
|
-
_request = _convert_request(_request)
|
2466
2525
|
_request.url = self._client.format_url(_request.url)
|
2467
2526
|
|
2468
2527
|
_stream = False
|
@@ -2496,8 +2555,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2496
2555
|
|
2497
2556
|
@distributed_trace
|
2498
2557
|
def delete_immutability_policy( # pylint: disable=inconsistent-return-statements
|
2499
|
-
self,
|
2558
|
+
self,
|
2559
|
+
timeout: Optional[int] = None,
|
2560
|
+
request_id_parameter: Optional[str] = None,
|
2561
|
+
snapshot: Optional[str] = None,
|
2562
|
+
version_id: Optional[str] = None,
|
2563
|
+
**kwargs: Any
|
2500
2564
|
) -> None:
|
2565
|
+
# pylint: disable=line-too-long
|
2501
2566
|
"""The Delete Immutability Policy operation deletes the immutability policy on the blob.
|
2502
2567
|
|
2503
2568
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -2509,11 +2574,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2509
2574
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2510
2575
|
value is None.
|
2511
2576
|
:type request_id_parameter: str
|
2577
|
+
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
2578
|
+
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
2579
|
+
see :code:`<a
|
2580
|
+
href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
|
2581
|
+
a Snapshot of a Blob.</a>`. Default value is None.
|
2582
|
+
:type snapshot: str
|
2583
|
+
:param version_id: The version id parameter is an opaque DateTime value that, when present,
|
2584
|
+
specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
|
2585
|
+
Default value is None.
|
2586
|
+
:type version_id: str
|
2512
2587
|
:return: None or the result of cls(response)
|
2513
2588
|
:rtype: None
|
2514
2589
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2515
2590
|
"""
|
2516
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2591
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2517
2592
|
401: ClientAuthenticationError,
|
2518
2593
|
404: ResourceNotFoundError,
|
2519
2594
|
409: ResourceExistsError,
|
@@ -2531,12 +2606,13 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2531
2606
|
url=self._config.url,
|
2532
2607
|
timeout=timeout,
|
2533
2608
|
request_id_parameter=request_id_parameter,
|
2609
|
+
snapshot=snapshot,
|
2610
|
+
version_id=version_id,
|
2534
2611
|
comp=comp,
|
2535
2612
|
version=self._config.version,
|
2536
2613
|
headers=_headers,
|
2537
2614
|
params=_params,
|
2538
2615
|
)
|
2539
|
-
_request = _convert_request(_request)
|
2540
2616
|
_request.url = self._client.format_url(_request.url)
|
2541
2617
|
|
2542
2618
|
_stream = False
|
@@ -2564,8 +2640,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2564
2640
|
|
2565
2641
|
@distributed_trace
|
2566
2642
|
def set_legal_hold( # pylint: disable=inconsistent-return-statements
|
2567
|
-
self,
|
2643
|
+
self,
|
2644
|
+
legal_hold: bool,
|
2645
|
+
timeout: Optional[int] = None,
|
2646
|
+
request_id_parameter: Optional[str] = None,
|
2647
|
+
snapshot: Optional[str] = None,
|
2648
|
+
version_id: Optional[str] = None,
|
2649
|
+
**kwargs: Any
|
2568
2650
|
) -> None:
|
2651
|
+
# pylint: disable=line-too-long
|
2569
2652
|
"""The Set Legal Hold operation sets a legal hold on the blob.
|
2570
2653
|
|
2571
2654
|
:param legal_hold: Specified if a legal hold should be set on the blob. Required.
|
@@ -2579,11 +2662,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2579
2662
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2580
2663
|
value is None.
|
2581
2664
|
:type request_id_parameter: str
|
2665
|
+
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
2666
|
+
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
2667
|
+
see :code:`<a
|
2668
|
+
href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
|
2669
|
+
a Snapshot of a Blob.</a>`. Default value is None.
|
2670
|
+
:type snapshot: str
|
2671
|
+
:param version_id: The version id parameter is an opaque DateTime value that, when present,
|
2672
|
+
specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
|
2673
|
+
Default value is None.
|
2674
|
+
:type version_id: str
|
2582
2675
|
:return: None or the result of cls(response)
|
2583
2676
|
:rtype: None
|
2584
2677
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2585
2678
|
"""
|
2586
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2679
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2587
2680
|
401: ClientAuthenticationError,
|
2588
2681
|
404: ResourceNotFoundError,
|
2589
2682
|
409: ResourceExistsError,
|
@@ -2602,12 +2695,13 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2602
2695
|
legal_hold=legal_hold,
|
2603
2696
|
timeout=timeout,
|
2604
2697
|
request_id_parameter=request_id_parameter,
|
2698
|
+
snapshot=snapshot,
|
2699
|
+
version_id=version_id,
|
2605
2700
|
comp=comp,
|
2606
2701
|
version=self._config.version,
|
2607
2702
|
headers=_headers,
|
2608
2703
|
params=_params,
|
2609
2704
|
)
|
2610
|
-
_request = _convert_request(_request)
|
2611
2705
|
_request.url = self._client.format_url(_request.url)
|
2612
2706
|
|
2613
2707
|
_stream = False
|
@@ -2646,6 +2740,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2646
2740
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2647
2741
|
**kwargs: Any
|
2648
2742
|
) -> None:
|
2743
|
+
# pylint: disable=line-too-long
|
2649
2744
|
"""The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or
|
2650
2745
|
more name-value pairs.
|
2651
2746
|
|
@@ -2678,7 +2773,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2678
2773
|
:rtype: None
|
2679
2774
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2680
2775
|
"""
|
2681
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2776
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2682
2777
|
401: ClientAuthenticationError,
|
2683
2778
|
404: ResourceNotFoundError,
|
2684
2779
|
409: ResourceExistsError,
|
@@ -2737,7 +2832,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2737
2832
|
headers=_headers,
|
2738
2833
|
params=_params,
|
2739
2834
|
)
|
2740
|
-
_request = _convert_request(_request)
|
2741
2835
|
_request.url = self._client.format_url(_request.url)
|
2742
2836
|
|
2743
2837
|
_stream = False
|
@@ -2785,6 +2879,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2785
2879
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2786
2880
|
**kwargs: Any
|
2787
2881
|
) -> None:
|
2882
|
+
# pylint: disable=line-too-long
|
2788
2883
|
"""[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
2789
2884
|
operations.
|
2790
2885
|
|
@@ -2811,7 +2906,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2811
2906
|
:rtype: None
|
2812
2907
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2813
2908
|
"""
|
2814
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
2909
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2815
2910
|
401: ClientAuthenticationError,
|
2816
2911
|
404: ResourceNotFoundError,
|
2817
2912
|
409: ResourceExistsError,
|
@@ -2855,7 +2950,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2855
2950
|
headers=_headers,
|
2856
2951
|
params=_params,
|
2857
2952
|
)
|
2858
|
-
_request = _convert_request(_request)
|
2859
2953
|
_request.url = self._client.format_url(_request.url)
|
2860
2954
|
|
2861
2955
|
_stream = False
|
@@ -2893,6 +2987,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2893
2987
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2894
2988
|
**kwargs: Any
|
2895
2989
|
) -> None:
|
2990
|
+
# pylint: disable=line-too-long
|
2896
2991
|
"""[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
2897
2992
|
operations.
|
2898
2993
|
|
@@ -2913,7 +3008,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2913
3008
|
:rtype: None
|
2914
3009
|
:raises ~azure.core.exceptions.HttpResponseError:
|
2915
3010
|
"""
|
2916
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3011
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
2917
3012
|
401: ClientAuthenticationError,
|
2918
3013
|
404: ResourceNotFoundError,
|
2919
3014
|
409: ResourceExistsError,
|
@@ -2956,7 +3051,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2956
3051
|
headers=_headers,
|
2957
3052
|
params=_params,
|
2958
3053
|
)
|
2959
|
-
_request = _convert_request(_request)
|
2960
3054
|
_request.url = self._client.format_url(_request.url)
|
2961
3055
|
|
2962
3056
|
_stream = False
|
@@ -2993,6 +3087,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
2993
3087
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2994
3088
|
**kwargs: Any
|
2995
3089
|
) -> None:
|
3090
|
+
# pylint: disable=line-too-long
|
2996
3091
|
"""[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
2997
3092
|
operations.
|
2998
3093
|
|
@@ -3013,7 +3108,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3013
3108
|
:rtype: None
|
3014
3109
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3015
3110
|
"""
|
3016
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3111
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3017
3112
|
401: ClientAuthenticationError,
|
3018
3113
|
404: ResourceNotFoundError,
|
3019
3114
|
409: ResourceExistsError,
|
@@ -3056,7 +3151,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3056
3151
|
headers=_headers,
|
3057
3152
|
params=_params,
|
3058
3153
|
)
|
3059
|
-
_request = _convert_request(_request)
|
3060
3154
|
_request.url = self._client.format_url(_request.url)
|
3061
3155
|
|
3062
3156
|
_stream = False
|
@@ -3095,6 +3189,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3095
3189
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
3096
3190
|
**kwargs: Any
|
3097
3191
|
) -> None:
|
3192
|
+
# pylint: disable=line-too-long
|
3098
3193
|
"""[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
3099
3194
|
operations.
|
3100
3195
|
|
@@ -3119,7 +3214,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3119
3214
|
:rtype: None
|
3120
3215
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3121
3216
|
"""
|
3122
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3217
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3123
3218
|
401: ClientAuthenticationError,
|
3124
3219
|
404: ResourceNotFoundError,
|
3125
3220
|
409: ResourceExistsError,
|
@@ -3163,7 +3258,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3163
3258
|
headers=_headers,
|
3164
3259
|
params=_params,
|
3165
3260
|
)
|
3166
|
-
_request = _convert_request(_request)
|
3167
3261
|
_request.url = self._client.format_url(_request.url)
|
3168
3262
|
|
3169
3263
|
_stream = False
|
@@ -3201,6 +3295,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3201
3295
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
3202
3296
|
**kwargs: Any
|
3203
3297
|
) -> None:
|
3298
|
+
# pylint: disable=line-too-long
|
3204
3299
|
"""[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
|
3205
3300
|
operations.
|
3206
3301
|
|
@@ -3227,7 +3322,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3227
3322
|
:rtype: None
|
3228
3323
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3229
3324
|
"""
|
3230
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3325
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3231
3326
|
401: ClientAuthenticationError,
|
3232
3327
|
404: ResourceNotFoundError,
|
3233
3328
|
409: ResourceExistsError,
|
@@ -3270,7 +3365,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3270
3365
|
headers=_headers,
|
3271
3366
|
params=_params,
|
3272
3367
|
)
|
3273
|
-
_request = _convert_request(_request)
|
3274
3368
|
_request.url = self._client.format_url(_request.url)
|
3275
3369
|
|
3276
3370
|
_stream = False
|
@@ -3311,6 +3405,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3311
3405
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
3312
3406
|
**kwargs: Any
|
3313
3407
|
) -> None:
|
3408
|
+
# pylint: disable=line-too-long
|
3314
3409
|
"""The Create Snapshot operation creates a read-only snapshot of a blob.
|
3315
3410
|
|
3316
3411
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -3342,7 +3437,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3342
3437
|
:rtype: None
|
3343
3438
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3344
3439
|
"""
|
3345
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3440
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3346
3441
|
401: ClientAuthenticationError,
|
3347
3442
|
404: ResourceNotFoundError,
|
3348
3443
|
409: ResourceExistsError,
|
@@ -3401,7 +3496,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3401
3496
|
headers=_headers,
|
3402
3497
|
params=_params,
|
3403
3498
|
)
|
3404
|
-
_request = _convert_request(_request)
|
3405
3499
|
_request.url = self._client.format_url(_request.url)
|
3406
3500
|
|
3407
3501
|
_stream = False
|
@@ -3453,6 +3547,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3453
3547
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
3454
3548
|
**kwargs: Any
|
3455
3549
|
) -> None:
|
3550
|
+
# pylint: disable=line-too-long
|
3456
3551
|
"""The Start Copy From URL operation copies a blob or an internet resource to a new blob.
|
3457
3552
|
|
3458
3553
|
:param copy_source: Specifies the name of the source page blob snapshot. This value is a URL of
|
@@ -3509,7 +3604,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3509
3604
|
:rtype: None
|
3510
3605
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3511
3606
|
"""
|
3512
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3607
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3513
3608
|
401: ClientAuthenticationError,
|
3514
3609
|
404: ResourceNotFoundError,
|
3515
3610
|
409: ResourceExistsError,
|
@@ -3576,7 +3671,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3576
3671
|
headers=_headers,
|
3577
3672
|
params=_params,
|
3578
3673
|
)
|
3579
|
-
_request = _convert_request(_request)
|
3580
3674
|
_request.url = self._client.format_url(_request.url)
|
3581
3675
|
|
3582
3676
|
_stream = False
|
@@ -3628,6 +3722,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3628
3722
|
cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
|
3629
3723
|
**kwargs: Any
|
3630
3724
|
) -> None:
|
3725
|
+
# pylint: disable=line-too-long
|
3631
3726
|
"""The Copy From URL operation copies a blob or an internet resource to a new blob. It will not
|
3632
3727
|
return a response until the copy is complete.
|
3633
3728
|
|
@@ -3691,7 +3786,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3691
3786
|
:rtype: None
|
3692
3787
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3693
3788
|
"""
|
3694
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3789
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3695
3790
|
401: ClientAuthenticationError,
|
3696
3791
|
404: ResourceNotFoundError,
|
3697
3792
|
409: ResourceExistsError,
|
@@ -3764,7 +3859,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3764
3859
|
headers=_headers,
|
3765
3860
|
params=_params,
|
3766
3861
|
)
|
3767
|
-
_request = _convert_request(_request)
|
3768
3862
|
_request.url = self._client.format_url(_request.url)
|
3769
3863
|
|
3770
3864
|
_stream = False
|
@@ -3811,6 +3905,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3811
3905
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
3812
3906
|
**kwargs: Any
|
3813
3907
|
) -> None:
|
3908
|
+
# pylint: disable=line-too-long
|
3814
3909
|
"""The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a
|
3815
3910
|
destination blob with zero length and full metadata.
|
3816
3911
|
|
@@ -3832,7 +3927,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3832
3927
|
:rtype: None
|
3833
3928
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3834
3929
|
"""
|
3835
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
3930
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3836
3931
|
401: ClientAuthenticationError,
|
3837
3932
|
404: ResourceNotFoundError,
|
3838
3933
|
409: ResourceExistsError,
|
@@ -3865,7 +3960,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3865
3960
|
headers=_headers,
|
3866
3961
|
params=_params,
|
3867
3962
|
)
|
3868
|
-
_request = _convert_request(_request)
|
3869
3963
|
_request.url = self._client.format_url(_request.url)
|
3870
3964
|
|
3871
3965
|
_stream = False
|
@@ -3904,6 +3998,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3904
3998
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
3905
3999
|
**kwargs: Any
|
3906
4000
|
) -> None:
|
4001
|
+
# pylint: disable=line-too-long
|
3907
4002
|
"""The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a
|
3908
4003
|
premium storage account and on a block blob in a blob storage account (locally redundant
|
3909
4004
|
storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of
|
@@ -3944,7 +4039,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3944
4039
|
:rtype: None
|
3945
4040
|
:raises ~azure.core.exceptions.HttpResponseError:
|
3946
4041
|
"""
|
3947
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
4042
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
3948
4043
|
401: ClientAuthenticationError,
|
3949
4044
|
404: ResourceNotFoundError,
|
3950
4045
|
409: ResourceExistsError,
|
@@ -3980,7 +4075,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3980
4075
|
headers=_headers,
|
3981
4076
|
params=_params,
|
3982
4077
|
)
|
3983
|
-
_request = _convert_request(_request)
|
3984
4078
|
_request.url = self._client.format_url(_request.url)
|
3985
4079
|
|
3986
4080
|
_stream = False
|
@@ -3996,19 +4090,11 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
3996
4090
|
raise HttpResponseError(response=response, model=error)
|
3997
4091
|
|
3998
4092
|
response_headers = {}
|
3999
|
-
|
4000
|
-
|
4001
|
-
|
4002
|
-
|
4003
|
-
|
4004
|
-
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
4005
|
-
|
4006
|
-
if response.status_code == 202:
|
4007
|
-
response_headers["x-ms-client-request-id"] = self._deserialize(
|
4008
|
-
"str", response.headers.get("x-ms-client-request-id")
|
4009
|
-
)
|
4010
|
-
response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
|
4011
|
-
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
4093
|
+
response_headers["x-ms-client-request-id"] = self._deserialize(
|
4094
|
+
"str", response.headers.get("x-ms-client-request-id")
|
4095
|
+
)
|
4096
|
+
response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
|
4097
|
+
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
4012
4098
|
|
4013
4099
|
if cls:
|
4014
4100
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
@@ -4017,6 +4103,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4017
4103
|
def get_account_info( # pylint: disable=inconsistent-return-statements
|
4018
4104
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
4019
4105
|
) -> None:
|
4106
|
+
# pylint: disable=line-too-long
|
4020
4107
|
"""Returns the sku name and account kind.
|
4021
4108
|
|
4022
4109
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -4032,7 +4119,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4032
4119
|
:rtype: None
|
4033
4120
|
:raises ~azure.core.exceptions.HttpResponseError:
|
4034
4121
|
"""
|
4035
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
4122
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
4036
4123
|
401: ClientAuthenticationError,
|
4037
4124
|
404: ResourceNotFoundError,
|
4038
4125
|
409: ResourceExistsError,
|
@@ -4057,7 +4144,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4057
4144
|
headers=_headers,
|
4058
4145
|
params=_params,
|
4059
4146
|
)
|
4060
|
-
_request = _convert_request(_request)
|
4061
4147
|
_request.url = self._client.format_url(_request.url)
|
4062
4148
|
|
4063
4149
|
_stream = False
|
@@ -4098,6 +4184,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4098
4184
|
query_request: Optional[_models.QueryRequest] = None,
|
4099
4185
|
**kwargs: Any
|
4100
4186
|
) -> Iterator[bytes]:
|
4187
|
+
# pylint: disable=line-too-long
|
4101
4188
|
"""The Query operation enables users to select/project on blob data by providing simple query
|
4102
4189
|
expressions.
|
4103
4190
|
|
@@ -4128,7 +4215,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4128
4215
|
:rtype: Iterator[bytes]
|
4129
4216
|
:raises ~azure.core.exceptions.HttpResponseError:
|
4130
4217
|
"""
|
4131
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
4218
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
4132
4219
|
401: ClientAuthenticationError,
|
4133
4220
|
404: ResourceNotFoundError,
|
4134
4221
|
409: ResourceExistsError,
|
@@ -4190,9 +4277,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4190
4277
|
headers=_headers,
|
4191
4278
|
params=_params,
|
4192
4279
|
)
|
4193
|
-
_request = _convert_request(_request)
|
4194
4280
|
_request.url = self._client.format_url(_request.url)
|
4195
4281
|
|
4282
|
+
_decompress = kwargs.pop("decompress", True)
|
4196
4283
|
_stream = True
|
4197
4284
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
4198
4285
|
_request, stream=_stream, **kwargs
|
@@ -4201,6 +4288,10 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4201
4288
|
response = pipeline_response.http_response
|
4202
4289
|
|
4203
4290
|
if response.status_code not in [200, 206]:
|
4291
|
+
try:
|
4292
|
+
response.read() # Load the body in memory and close the socket
|
4293
|
+
except (StreamConsumedError, StreamClosedError):
|
4294
|
+
pass
|
4204
4295
|
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
4205
4296
|
error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
|
4206
4297
|
raise HttpResponseError(response=response, model=error)
|
@@ -4264,8 +4355,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4264
4355
|
"bytearray", response.headers.get("x-ms-blob-content-md5")
|
4265
4356
|
)
|
4266
4357
|
|
4267
|
-
deserialized = response.stream_download(self._client._pipeline)
|
4268
|
-
|
4269
4358
|
if response.status_code == 206:
|
4270
4359
|
response_headers["Last-Modified"] = self._deserialize("rfc-1123", response.headers.get("Last-Modified"))
|
4271
4360
|
response_headers["x-ms-meta"] = self._deserialize("{str}", response.headers.get("x-ms-meta"))
|
@@ -4327,7 +4416,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4327
4416
|
"bytearray", response.headers.get("x-ms-blob-content-md5")
|
4328
4417
|
)
|
4329
4418
|
|
4330
|
-
|
4419
|
+
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
|
4331
4420
|
|
4332
4421
|
if cls:
|
4333
4422
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -4345,6 +4434,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4345
4434
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
4346
4435
|
**kwargs: Any
|
4347
4436
|
) -> _models.BlobTags:
|
4437
|
+
# pylint: disable=line-too-long
|
4348
4438
|
"""The Get Tags operation enables users to get the tags associated with a blob.
|
4349
4439
|
|
4350
4440
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -4374,7 +4464,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4374
4464
|
:rtype: ~azure.storage.blob.models.BlobTags
|
4375
4465
|
:raises ~azure.core.exceptions.HttpResponseError:
|
4376
4466
|
"""
|
4377
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
4467
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
4378
4468
|
401: ClientAuthenticationError,
|
4379
4469
|
404: ResourceNotFoundError,
|
4380
4470
|
409: ResourceExistsError,
|
@@ -4408,7 +4498,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4408
4498
|
headers=_headers,
|
4409
4499
|
params=_params,
|
4410
4500
|
)
|
4411
|
-
_request = _convert_request(_request)
|
4412
4501
|
_request.url = self._client.format_url(_request.url)
|
4413
4502
|
|
4414
4503
|
_stream = False
|
@@ -4431,7 +4520,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4431
4520
|
response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
|
4432
4521
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
4433
4522
|
|
4434
|
-
deserialized = self._deserialize("BlobTags", pipeline_response)
|
4523
|
+
deserialized = self._deserialize("BlobTags", pipeline_response.http_response)
|
4435
4524
|
|
4436
4525
|
if cls:
|
4437
4526
|
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
@@ -4451,6 +4540,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4451
4540
|
tags: Optional[_models.BlobTags] = None,
|
4452
4541
|
**kwargs: Any
|
4453
4542
|
) -> None:
|
4543
|
+
# pylint: disable=line-too-long
|
4454
4544
|
"""The Set Tags operation enables users to set tags on a blob.
|
4455
4545
|
|
4456
4546
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
@@ -4482,7 +4572,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4482
4572
|
:rtype: None
|
4483
4573
|
:raises ~azure.core.exceptions.HttpResponseError:
|
4484
4574
|
"""
|
4485
|
-
error_map: MutableMapping[int, Type[HttpResponseError]] = {
|
4575
|
+
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
|
4486
4576
|
401: ClientAuthenticationError,
|
4487
4577
|
404: ResourceNotFoundError,
|
4488
4578
|
409: ResourceExistsError,
|
@@ -4524,7 +4614,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
|
|
4524
4614
|
headers=_headers,
|
4525
4615
|
params=_params,
|
4526
4616
|
)
|
4527
|
-
_request = _convert_request(_request)
|
4528
4617
|
_request.url = self._client.format_url(_request.url)
|
4529
4618
|
|
4530
4619
|
_stream = False
|