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.
Files changed (54) hide show
  1. azure/storage/blob/_blob_client.py +34 -10
  2. azure/storage/blob/_blob_client_helpers.py +7 -3
  3. azure/storage/blob/_blob_service_client.py +1 -1
  4. azure/storage/blob/_container_client.py +8 -2
  5. azure/storage/blob/_container_client_helpers.py +11 -6
  6. azure/storage/blob/_deserialize.py +2 -2
  7. azure/storage/blob/_encryption.py +15 -10
  8. azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
  9. azure/storage/blob/_generated/_configuration.py +2 -2
  10. azure/storage/blob/_generated/_serialization.py +267 -150
  11. azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
  12. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  13. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +23 -11
  14. azure/storage/blob/_generated/aio/operations/_blob_operations.py +137 -73
  15. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +42 -16
  16. azure/storage/blob/_generated/aio/operations/_container_operations.py +49 -44
  17. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +35 -23
  18. azure/storage/blob/_generated/aio/operations/_service_operations.py +30 -25
  19. azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +1 -0
  20. azure/storage/blob/_generated/operations/_append_blob_operations.py +35 -15
  21. azure/storage/blob/_generated/operations/_blob_operations.py +187 -98
  22. azure/storage/blob/_generated/operations/_block_blob_operations.py +64 -22
  23. azure/storage/blob/_generated/operations/_container_operations.py +67 -62
  24. azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -32
  25. azure/storage/blob/_generated/operations/_service_operations.py +38 -33
  26. azure/storage/blob/_list_blobs_helper.py +1 -1
  27. azure/storage/blob/_models.py +4 -3
  28. azure/storage/blob/_serialize.py +1 -0
  29. azure/storage/blob/_shared/avro/schema.py +1 -0
  30. azure/storage/blob/_shared/base_client.py +10 -8
  31. azure/storage/blob/_shared/base_client_async.py +5 -5
  32. azure/storage/blob/_shared/models.py +5 -2
  33. azure/storage/blob/_shared/policies.py +14 -16
  34. azure/storage/blob/_shared/policies_async.py +19 -6
  35. azure/storage/blob/_shared/request_handlers.py +2 -3
  36. azure/storage/blob/_shared/response_handlers.py +2 -2
  37. azure/storage/blob/_shared/uploads.py +4 -4
  38. azure/storage/blob/_shared/uploads_async.py +4 -4
  39. azure/storage/blob/_shared_access_signature.py +0 -1
  40. azure/storage/blob/_version.py +1 -1
  41. azure/storage/blob/aio/_blob_client_async.py +36 -13
  42. azure/storage/blob/aio/_blob_service_client_async.py +7 -3
  43. azure/storage/blob/aio/_container_client_async.py +10 -4
  44. azure/storage/blob/aio/_download_async.py +94 -71
  45. azure/storage/blob/aio/_lease_async.py +1 -1
  46. azure/storage/blob/aio/_list_blobs_helper.py +1 -2
  47. azure/storage/blob/aio/_models.py +1 -2
  48. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/METADATA +10 -10
  49. azure_storage_blob-12.24.0.dist-info/RECORD +84 -0
  50. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/WHEEL +1 -1
  51. azure/storage/blob/_generated/_vendor.py +0 -16
  52. azure_storage_blob-12.23.0b1.dist-info/RECORD +0 -85
  53. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/LICENSE +0 -0
  54. {azure_storage_blob-12.23.0b1.dist-info → azure_storage_blob-12.24.0.dist-info}/top_level.txt +0 -0
@@ -16,16 +16,16 @@ 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.pipeline.transport import AsyncHttpResponse
23
- from azure.core.rest import HttpRequest
24
+ from azure.core.rest import AsyncHttpResponse, HttpRequest
24
25
  from azure.core.tracing.decorator_async import distributed_trace_async
25
26
  from azure.core.utils import case_insensitive_dict
26
27
 
27
28
  from ... import models as _models
28
- from ..._vendor import _convert_request
29
29
  from ...operations._blob_operations import (
30
30
  build_abort_copy_from_url_request,
31
31
  build_acquire_lease_request,
@@ -89,12 +89,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
89
89
  range: Optional[str] = None,
90
90
  range_get_content_md5: Optional[bool] = None,
91
91
  range_get_content_crc64: Optional[bool] = None,
92
+ structured_body_type: Optional[str] = None,
92
93
  request_id_parameter: Optional[str] = None,
93
94
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
94
95
  cpk_info: Optional[_models.CpkInfo] = None,
95
96
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
96
97
  **kwargs: Any
97
98
  ) -> AsyncIterator[bytes]:
99
+ # pylint: disable=line-too-long
98
100
  """The Download operation reads or downloads a blob from the system, including its metadata and
99
101
  properties. You can also call Download to read a snapshot.
100
102
 
@@ -123,6 +125,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
123
125
  service returns the CRC64 hash for the range, as long as the range is less than or equal to 4
124
126
  MB in size. Default value is None.
125
127
  :type range_get_content_crc64: bool
128
+ :param structured_body_type: Specifies the response content should be returned as a structured
129
+ message and specifies the message schema version and properties. Default value is None.
130
+ :type structured_body_type: str
126
131
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
127
132
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
128
133
  value is None.
@@ -137,7 +142,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
137
142
  :rtype: AsyncIterator[bytes]
138
143
  :raises ~azure.core.exceptions.HttpResponseError:
139
144
  """
140
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
145
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
141
146
  401: ClientAuthenticationError,
142
147
  404: ResourceNotFoundError,
143
148
  409: ResourceExistsError,
@@ -181,6 +186,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
181
186
  lease_id=_lease_id,
182
187
  range_get_content_md5=range_get_content_md5,
183
188
  range_get_content_crc64=range_get_content_crc64,
189
+ structured_body_type=structured_body_type,
184
190
  encryption_key=_encryption_key,
185
191
  encryption_key_sha256=_encryption_key_sha256,
186
192
  encryption_algorithm=_encryption_algorithm,
@@ -194,9 +200,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
194
200
  headers=_headers,
195
201
  params=_params,
196
202
  )
197
- _request = _convert_request(_request)
198
203
  _request.url = self._client.format_url(_request.url)
199
204
 
205
+ _decompress = kwargs.pop("decompress", True)
200
206
  _stream = True
201
207
  pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
202
208
  _request, stream=_stream, **kwargs
@@ -205,6 +211,10 @@ class BlobOperations: # pylint: disable=too-many-public-methods
205
211
  response = pipeline_response.http_response
206
212
 
207
213
  if response.status_code not in [200, 206]:
214
+ try:
215
+ await response.read() # Load the body in memory and close the socket
216
+ except (StreamConsumedError, StreamClosedError):
217
+ pass
208
218
  map_error(status_code=response.status_code, response=response, error_map=error_map)
209
219
  error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
210
220
  raise HttpResponseError(response=response, model=error)
@@ -288,8 +298,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
288
298
  "str", response.headers.get("x-ms-immutability-policy-mode")
289
299
  )
290
300
  response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
291
-
292
- deserialized = response.stream_download(self._client._pipeline)
301
+ response_headers["x-ms-structured-body"] = self._deserialize(
302
+ "str", response.headers.get("x-ms-structured-body")
303
+ )
304
+ response_headers["x-ms-structured-content-length"] = self._deserialize(
305
+ "int", response.headers.get("x-ms-structured-content-length")
306
+ )
293
307
 
294
308
  if response.status_code == 206:
295
309
  response_headers["Last-Modified"] = self._deserialize("rfc-1123", response.headers.get("Last-Modified"))
@@ -372,8 +386,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
372
386
  "str", response.headers.get("x-ms-immutability-policy-mode")
373
387
  )
374
388
  response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
389
+ response_headers["x-ms-structured-body"] = self._deserialize(
390
+ "str", response.headers.get("x-ms-structured-body")
391
+ )
392
+ response_headers["x-ms-structured-content-length"] = self._deserialize(
393
+ "int", response.headers.get("x-ms-structured-content-length")
394
+ )
375
395
 
376
- deserialized = response.stream_download(self._client._pipeline)
396
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
377
397
 
378
398
  if cls:
379
399
  return cls(pipeline_response, deserialized, response_headers) # type: ignore
@@ -392,6 +412,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
392
412
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
393
413
  **kwargs: Any
394
414
  ) -> None:
415
+ # pylint: disable=line-too-long
395
416
  """The Get Properties operation returns all user-defined metadata, standard HTTP properties, and
396
417
  system properties for the blob. It does not return the content of the blob.
397
418
 
@@ -424,7 +445,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
424
445
  :rtype: None
425
446
  :raises ~azure.core.exceptions.HttpResponseError:
426
447
  """
427
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
448
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
428
449
  401: ClientAuthenticationError,
429
450
  404: ResourceNotFoundError,
430
451
  409: ResourceExistsError,
@@ -478,7 +499,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
478
499
  headers=_headers,
479
500
  params=_params,
480
501
  )
481
- _request = _convert_request(_request)
482
502
  _request.url = self._client.format_url(_request.url)
483
503
 
484
504
  _stream = False
@@ -596,6 +616,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
596
616
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
597
617
  **kwargs: Any
598
618
  ) -> None:
619
+ # pylint: disable=line-too-long
599
620
  """If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
600
621
  permanently removed from the storage account. If the storage account's soft delete feature is
601
622
  enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible
@@ -645,7 +666,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
645
666
  :rtype: None
646
667
  :raises ~azure.core.exceptions.HttpResponseError:
647
668
  """
648
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
669
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
649
670
  401: ClientAuthenticationError,
650
671
  404: ResourceNotFoundError,
651
672
  409: ResourceExistsError,
@@ -691,7 +712,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
691
712
  headers=_headers,
692
713
  params=_params,
693
714
  )
694
- _request = _convert_request(_request)
695
715
  _request.url = self._client.format_url(_request.url)
696
716
 
697
717
  _stream = False
@@ -721,6 +741,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
721
741
  async def undelete( # pylint: disable=inconsistent-return-statements
722
742
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
723
743
  ) -> None:
744
+ # pylint: disable=line-too-long
724
745
  """Undelete a blob that was previously soft deleted.
725
746
 
726
747
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -736,7 +757,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
736
757
  :rtype: None
737
758
  :raises ~azure.core.exceptions.HttpResponseError:
738
759
  """
739
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
760
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
740
761
  401: ClientAuthenticationError,
741
762
  404: ResourceNotFoundError,
742
763
  409: ResourceExistsError,
@@ -759,7 +780,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
759
780
  headers=_headers,
760
781
  params=_params,
761
782
  )
762
- _request = _convert_request(_request)
763
783
  _request.url = self._client.format_url(_request.url)
764
784
 
765
785
  _stream = False
@@ -794,6 +814,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
794
814
  expires_on: Optional[str] = None,
795
815
  **kwargs: Any
796
816
  ) -> None:
817
+ # pylint: disable=line-too-long
797
818
  """Sets the time a blob will expire and be deleted.
798
819
 
799
820
  :param expiry_options: Required. Indicates mode of the expiry time. Known values are:
@@ -814,7 +835,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
814
835
  :rtype: None
815
836
  :raises ~azure.core.exceptions.HttpResponseError:
816
837
  """
817
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
838
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
818
839
  401: ClientAuthenticationError,
819
840
  404: ResourceNotFoundError,
820
841
  409: ResourceExistsError,
@@ -839,7 +860,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
839
860
  headers=_headers,
840
861
  params=_params,
841
862
  )
842
- _request = _convert_request(_request)
843
863
  _request.url = self._client.format_url(_request.url)
844
864
 
845
865
  _stream = False
@@ -877,6 +897,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
877
897
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
878
898
  **kwargs: Any
879
899
  ) -> None:
900
+ # pylint: disable=line-too-long
880
901
  """The Set HTTP Headers operation sets system properties on the blob.
881
902
 
882
903
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -898,7 +919,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
898
919
  :rtype: None
899
920
  :raises ~azure.core.exceptions.HttpResponseError:
900
921
  """
901
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
922
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
902
923
  401: ClientAuthenticationError,
903
924
  404: ResourceNotFoundError,
904
925
  409: ResourceExistsError,
@@ -961,7 +982,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
961
982
  headers=_headers,
962
983
  params=_params,
963
984
  )
964
- _request = _convert_request(_request)
965
985
  _request.url = self._client.format_url(_request.url)
966
986
 
967
987
  _stream = False
@@ -999,9 +1019,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
999
1019
  request_id_parameter: Optional[str] = None,
1000
1020
  immutability_policy_expiry: Optional[datetime.datetime] = None,
1001
1021
  immutability_policy_mode: Optional[Union[str, _models.BlobImmutabilityPolicyMode]] = None,
1022
+ snapshot: Optional[str] = None,
1023
+ version_id: Optional[str] = None,
1002
1024
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1003
1025
  **kwargs: Any
1004
1026
  ) -> None:
1027
+ # pylint: disable=line-too-long
1005
1028
  """The Set Immutability Policy operation sets the immutability policy on the blob.
1006
1029
 
1007
1030
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -1019,13 +1042,23 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1019
1042
  :param immutability_policy_mode: Specifies the immutability policy mode to set on the blob.
1020
1043
  Known values are: "Mutable", "Unlocked", and "Locked". Default value is None.
1021
1044
  :type immutability_policy_mode: str or ~azure.storage.blob.models.BlobImmutabilityPolicyMode
1045
+ :param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
1046
+ specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
1047
+ see :code:`<a
1048
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
1049
+ a Snapshot of a Blob.</a>`. Default value is None.
1050
+ :type snapshot: str
1051
+ :param version_id: The version id parameter is an opaque DateTime value that, when present,
1052
+ specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
1053
+ Default value is None.
1054
+ :type version_id: str
1022
1055
  :param modified_access_conditions: Parameter group. Default value is None.
1023
1056
  :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
1024
1057
  :return: None or the result of cls(response)
1025
1058
  :rtype: None
1026
1059
  :raises ~azure.core.exceptions.HttpResponseError:
1027
1060
  """
1028
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1061
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1029
1062
  401: ClientAuthenticationError,
1030
1063
  404: ResourceNotFoundError,
1031
1064
  409: ResourceExistsError,
@@ -1050,12 +1083,13 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1050
1083
  if_unmodified_since=_if_unmodified_since,
1051
1084
  immutability_policy_expiry=immutability_policy_expiry,
1052
1085
  immutability_policy_mode=immutability_policy_mode,
1086
+ snapshot=snapshot,
1087
+ version_id=version_id,
1053
1088
  comp=comp,
1054
1089
  version=self._config.version,
1055
1090
  headers=_headers,
1056
1091
  params=_params,
1057
1092
  )
1058
- _request = _convert_request(_request)
1059
1093
  _request.url = self._client.format_url(_request.url)
1060
1094
 
1061
1095
  _stream = False
@@ -1089,8 +1123,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1089
1123
 
1090
1124
  @distributed_trace_async
1091
1125
  async def delete_immutability_policy( # pylint: disable=inconsistent-return-statements
1092
- self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
1126
+ self,
1127
+ timeout: Optional[int] = None,
1128
+ request_id_parameter: Optional[str] = None,
1129
+ snapshot: Optional[str] = None,
1130
+ version_id: Optional[str] = None,
1131
+ **kwargs: Any
1093
1132
  ) -> None:
1133
+ # pylint: disable=line-too-long
1094
1134
  """The Delete Immutability Policy operation deletes the immutability policy on the blob.
1095
1135
 
1096
1136
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -1102,11 +1142,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1102
1142
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
1103
1143
  value is None.
1104
1144
  :type request_id_parameter: str
1145
+ :param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
1146
+ specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
1147
+ see :code:`<a
1148
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
1149
+ a Snapshot of a Blob.</a>`. Default value is None.
1150
+ :type snapshot: str
1151
+ :param version_id: The version id parameter is an opaque DateTime value that, when present,
1152
+ specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
1153
+ Default value is None.
1154
+ :type version_id: str
1105
1155
  :return: None or the result of cls(response)
1106
1156
  :rtype: None
1107
1157
  :raises ~azure.core.exceptions.HttpResponseError:
1108
1158
  """
1109
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1159
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1110
1160
  401: ClientAuthenticationError,
1111
1161
  404: ResourceNotFoundError,
1112
1162
  409: ResourceExistsError,
@@ -1124,12 +1174,13 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1124
1174
  url=self._config.url,
1125
1175
  timeout=timeout,
1126
1176
  request_id_parameter=request_id_parameter,
1177
+ snapshot=snapshot,
1178
+ version_id=version_id,
1127
1179
  comp=comp,
1128
1180
  version=self._config.version,
1129
1181
  headers=_headers,
1130
1182
  params=_params,
1131
1183
  )
1132
- _request = _convert_request(_request)
1133
1184
  _request.url = self._client.format_url(_request.url)
1134
1185
 
1135
1186
  _stream = False
@@ -1157,8 +1208,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1157
1208
 
1158
1209
  @distributed_trace_async
1159
1210
  async def set_legal_hold( # pylint: disable=inconsistent-return-statements
1160
- self, legal_hold: bool, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
1211
+ self,
1212
+ legal_hold: bool,
1213
+ timeout: Optional[int] = None,
1214
+ request_id_parameter: Optional[str] = None,
1215
+ snapshot: Optional[str] = None,
1216
+ version_id: Optional[str] = None,
1217
+ **kwargs: Any
1161
1218
  ) -> None:
1219
+ # pylint: disable=line-too-long
1162
1220
  """The Set Legal Hold operation sets a legal hold on the blob.
1163
1221
 
1164
1222
  :param legal_hold: Specified if a legal hold should be set on the blob. Required.
@@ -1172,11 +1230,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1172
1230
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
1173
1231
  value is None.
1174
1232
  :type request_id_parameter: str
1233
+ :param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
1234
+ specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
1235
+ see :code:`<a
1236
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
1237
+ a Snapshot of a Blob.</a>`. Default value is None.
1238
+ :type snapshot: str
1239
+ :param version_id: The version id parameter is an opaque DateTime value that, when present,
1240
+ specifies the version of the blob to operate on. It's for service version 2019-10-10 and newer.
1241
+ Default value is None.
1242
+ :type version_id: str
1175
1243
  :return: None or the result of cls(response)
1176
1244
  :rtype: None
1177
1245
  :raises ~azure.core.exceptions.HttpResponseError:
1178
1246
  """
1179
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1247
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1180
1248
  401: ClientAuthenticationError,
1181
1249
  404: ResourceNotFoundError,
1182
1250
  409: ResourceExistsError,
@@ -1195,12 +1263,13 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1195
1263
  legal_hold=legal_hold,
1196
1264
  timeout=timeout,
1197
1265
  request_id_parameter=request_id_parameter,
1266
+ snapshot=snapshot,
1267
+ version_id=version_id,
1198
1268
  comp=comp,
1199
1269
  version=self._config.version,
1200
1270
  headers=_headers,
1201
1271
  params=_params,
1202
1272
  )
1203
- _request = _convert_request(_request)
1204
1273
  _request.url = self._client.format_url(_request.url)
1205
1274
 
1206
1275
  _stream = False
@@ -1239,6 +1308,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1239
1308
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1240
1309
  **kwargs: Any
1241
1310
  ) -> None:
1311
+ # pylint: disable=line-too-long
1242
1312
  """The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or
1243
1313
  more name-value pairs.
1244
1314
 
@@ -1271,7 +1341,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1271
1341
  :rtype: None
1272
1342
  :raises ~azure.core.exceptions.HttpResponseError:
1273
1343
  """
1274
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1344
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1275
1345
  401: ClientAuthenticationError,
1276
1346
  404: ResourceNotFoundError,
1277
1347
  409: ResourceExistsError,
@@ -1330,7 +1400,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1330
1400
  headers=_headers,
1331
1401
  params=_params,
1332
1402
  )
1333
- _request = _convert_request(_request)
1334
1403
  _request.url = self._client.format_url(_request.url)
1335
1404
 
1336
1405
  _stream = False
@@ -1378,6 +1447,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1378
1447
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1379
1448
  **kwargs: Any
1380
1449
  ) -> None:
1450
+ # pylint: disable=line-too-long
1381
1451
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1382
1452
  operations.
1383
1453
 
@@ -1404,7 +1474,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1404
1474
  :rtype: None
1405
1475
  :raises ~azure.core.exceptions.HttpResponseError:
1406
1476
  """
1407
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1477
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1408
1478
  401: ClientAuthenticationError,
1409
1479
  404: ResourceNotFoundError,
1410
1480
  409: ResourceExistsError,
@@ -1448,7 +1518,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1448
1518
  headers=_headers,
1449
1519
  params=_params,
1450
1520
  )
1451
- _request = _convert_request(_request)
1452
1521
  _request.url = self._client.format_url(_request.url)
1453
1522
 
1454
1523
  _stream = False
@@ -1486,6 +1555,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1486
1555
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1487
1556
  **kwargs: Any
1488
1557
  ) -> None:
1558
+ # pylint: disable=line-too-long
1489
1559
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1490
1560
  operations.
1491
1561
 
@@ -1506,7 +1576,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1506
1576
  :rtype: None
1507
1577
  :raises ~azure.core.exceptions.HttpResponseError:
1508
1578
  """
1509
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1579
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1510
1580
  401: ClientAuthenticationError,
1511
1581
  404: ResourceNotFoundError,
1512
1582
  409: ResourceExistsError,
@@ -1549,7 +1619,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1549
1619
  headers=_headers,
1550
1620
  params=_params,
1551
1621
  )
1552
- _request = _convert_request(_request)
1553
1622
  _request.url = self._client.format_url(_request.url)
1554
1623
 
1555
1624
  _stream = False
@@ -1586,6 +1655,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1586
1655
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1587
1656
  **kwargs: Any
1588
1657
  ) -> None:
1658
+ # pylint: disable=line-too-long
1589
1659
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1590
1660
  operations.
1591
1661
 
@@ -1606,7 +1676,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1606
1676
  :rtype: None
1607
1677
  :raises ~azure.core.exceptions.HttpResponseError:
1608
1678
  """
1609
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1679
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1610
1680
  401: ClientAuthenticationError,
1611
1681
  404: ResourceNotFoundError,
1612
1682
  409: ResourceExistsError,
@@ -1649,7 +1719,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1649
1719
  headers=_headers,
1650
1720
  params=_params,
1651
1721
  )
1652
- _request = _convert_request(_request)
1653
1722
  _request.url = self._client.format_url(_request.url)
1654
1723
 
1655
1724
  _stream = False
@@ -1688,6 +1757,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1688
1757
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1689
1758
  **kwargs: Any
1690
1759
  ) -> None:
1760
+ # pylint: disable=line-too-long
1691
1761
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1692
1762
  operations.
1693
1763
 
@@ -1712,7 +1782,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1712
1782
  :rtype: None
1713
1783
  :raises ~azure.core.exceptions.HttpResponseError:
1714
1784
  """
1715
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1785
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1716
1786
  401: ClientAuthenticationError,
1717
1787
  404: ResourceNotFoundError,
1718
1788
  409: ResourceExistsError,
@@ -1756,7 +1826,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1756
1826
  headers=_headers,
1757
1827
  params=_params,
1758
1828
  )
1759
- _request = _convert_request(_request)
1760
1829
  _request.url = self._client.format_url(_request.url)
1761
1830
 
1762
1831
  _stream = False
@@ -1794,6 +1863,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1794
1863
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1795
1864
  **kwargs: Any
1796
1865
  ) -> None:
1866
+ # pylint: disable=line-too-long
1797
1867
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1798
1868
  operations.
1799
1869
 
@@ -1820,7 +1890,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1820
1890
  :rtype: None
1821
1891
  :raises ~azure.core.exceptions.HttpResponseError:
1822
1892
  """
1823
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1893
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1824
1894
  401: ClientAuthenticationError,
1825
1895
  404: ResourceNotFoundError,
1826
1896
  409: ResourceExistsError,
@@ -1863,7 +1933,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1863
1933
  headers=_headers,
1864
1934
  params=_params,
1865
1935
  )
1866
- _request = _convert_request(_request)
1867
1936
  _request.url = self._client.format_url(_request.url)
1868
1937
 
1869
1938
  _stream = False
@@ -1904,6 +1973,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1904
1973
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
1905
1974
  **kwargs: Any
1906
1975
  ) -> None:
1976
+ # pylint: disable=line-too-long
1907
1977
  """The Create Snapshot operation creates a read-only snapshot of a blob.
1908
1978
 
1909
1979
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -1935,7 +2005,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1935
2005
  :rtype: None
1936
2006
  :raises ~azure.core.exceptions.HttpResponseError:
1937
2007
  """
1938
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2008
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1939
2009
  401: ClientAuthenticationError,
1940
2010
  404: ResourceNotFoundError,
1941
2011
  409: ResourceExistsError,
@@ -1994,7 +2064,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1994
2064
  headers=_headers,
1995
2065
  params=_params,
1996
2066
  )
1997
- _request = _convert_request(_request)
1998
2067
  _request.url = self._client.format_url(_request.url)
1999
2068
 
2000
2069
  _stream = False
@@ -2046,6 +2115,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2046
2115
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
2047
2116
  **kwargs: Any
2048
2117
  ) -> None:
2118
+ # pylint: disable=line-too-long
2049
2119
  """The Start Copy From URL operation copies a blob or an internet resource to a new blob.
2050
2120
 
2051
2121
  :param copy_source: Specifies the name of the source page blob snapshot. This value is a URL of
@@ -2102,7 +2172,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2102
2172
  :rtype: None
2103
2173
  :raises ~azure.core.exceptions.HttpResponseError:
2104
2174
  """
2105
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2175
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2106
2176
  401: ClientAuthenticationError,
2107
2177
  404: ResourceNotFoundError,
2108
2178
  409: ResourceExistsError,
@@ -2169,7 +2239,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2169
2239
  headers=_headers,
2170
2240
  params=_params,
2171
2241
  )
2172
- _request = _convert_request(_request)
2173
2242
  _request.url = self._client.format_url(_request.url)
2174
2243
 
2175
2244
  _stream = False
@@ -2221,6 +2290,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2221
2290
  cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
2222
2291
  **kwargs: Any
2223
2292
  ) -> None:
2293
+ # pylint: disable=line-too-long
2224
2294
  """The Copy From URL operation copies a blob or an internet resource to a new blob. It will not
2225
2295
  return a response until the copy is complete.
2226
2296
 
@@ -2284,7 +2354,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2284
2354
  :rtype: None
2285
2355
  :raises ~azure.core.exceptions.HttpResponseError:
2286
2356
  """
2287
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2357
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2288
2358
  401: ClientAuthenticationError,
2289
2359
  404: ResourceNotFoundError,
2290
2360
  409: ResourceExistsError,
@@ -2357,7 +2427,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2357
2427
  headers=_headers,
2358
2428
  params=_params,
2359
2429
  )
2360
- _request = _convert_request(_request)
2361
2430
  _request.url = self._client.format_url(_request.url)
2362
2431
 
2363
2432
  _stream = False
@@ -2404,6 +2473,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2404
2473
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
2405
2474
  **kwargs: Any
2406
2475
  ) -> None:
2476
+ # pylint: disable=line-too-long
2407
2477
  """The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a
2408
2478
  destination blob with zero length and full metadata.
2409
2479
 
@@ -2425,7 +2495,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2425
2495
  :rtype: None
2426
2496
  :raises ~azure.core.exceptions.HttpResponseError:
2427
2497
  """
2428
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2498
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2429
2499
  401: ClientAuthenticationError,
2430
2500
  404: ResourceNotFoundError,
2431
2501
  409: ResourceExistsError,
@@ -2458,7 +2528,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2458
2528
  headers=_headers,
2459
2529
  params=_params,
2460
2530
  )
2461
- _request = _convert_request(_request)
2462
2531
  _request.url = self._client.format_url(_request.url)
2463
2532
 
2464
2533
  _stream = False
@@ -2497,6 +2566,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2497
2566
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
2498
2567
  **kwargs: Any
2499
2568
  ) -> None:
2569
+ # pylint: disable=line-too-long
2500
2570
  """The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a
2501
2571
  premium storage account and on a block blob in a blob storage account (locally redundant
2502
2572
  storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of
@@ -2537,7 +2607,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2537
2607
  :rtype: None
2538
2608
  :raises ~azure.core.exceptions.HttpResponseError:
2539
2609
  """
2540
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2610
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2541
2611
  401: ClientAuthenticationError,
2542
2612
  404: ResourceNotFoundError,
2543
2613
  409: ResourceExistsError,
@@ -2573,7 +2643,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2573
2643
  headers=_headers,
2574
2644
  params=_params,
2575
2645
  )
2576
- _request = _convert_request(_request)
2577
2646
  _request.url = self._client.format_url(_request.url)
2578
2647
 
2579
2648
  _stream = False
@@ -2589,19 +2658,11 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2589
2658
  raise HttpResponseError(response=response, model=error)
2590
2659
 
2591
2660
  response_headers = {}
2592
- if response.status_code == 200:
2593
- response_headers["x-ms-client-request-id"] = self._deserialize(
2594
- "str", response.headers.get("x-ms-client-request-id")
2595
- )
2596
- response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
2597
- response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
2598
-
2599
- if response.status_code == 202:
2600
- response_headers["x-ms-client-request-id"] = self._deserialize(
2601
- "str", response.headers.get("x-ms-client-request-id")
2602
- )
2603
- response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
2604
- response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
2661
+ response_headers["x-ms-client-request-id"] = self._deserialize(
2662
+ "str", response.headers.get("x-ms-client-request-id")
2663
+ )
2664
+ response_headers["x-ms-request-id"] = self._deserialize("str", response.headers.get("x-ms-request-id"))
2665
+ response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
2605
2666
 
2606
2667
  if cls:
2607
2668
  return cls(pipeline_response, None, response_headers) # type: ignore
@@ -2610,6 +2671,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2610
2671
  async def get_account_info( # pylint: disable=inconsistent-return-statements
2611
2672
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
2612
2673
  ) -> None:
2674
+ # pylint: disable=line-too-long
2613
2675
  """Returns the sku name and account kind.
2614
2676
 
2615
2677
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -2625,7 +2687,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2625
2687
  :rtype: None
2626
2688
  :raises ~azure.core.exceptions.HttpResponseError:
2627
2689
  """
2628
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2690
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2629
2691
  401: ClientAuthenticationError,
2630
2692
  404: ResourceNotFoundError,
2631
2693
  409: ResourceExistsError,
@@ -2650,7 +2712,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2650
2712
  headers=_headers,
2651
2713
  params=_params,
2652
2714
  )
2653
- _request = _convert_request(_request)
2654
2715
  _request.url = self._client.format_url(_request.url)
2655
2716
 
2656
2717
  _stream = False
@@ -2691,6 +2752,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2691
2752
  query_request: Optional[_models.QueryRequest] = None,
2692
2753
  **kwargs: Any
2693
2754
  ) -> AsyncIterator[bytes]:
2755
+ # pylint: disable=line-too-long
2694
2756
  """The Query operation enables users to select/project on blob data by providing simple query
2695
2757
  expressions.
2696
2758
 
@@ -2721,7 +2783,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2721
2783
  :rtype: AsyncIterator[bytes]
2722
2784
  :raises ~azure.core.exceptions.HttpResponseError:
2723
2785
  """
2724
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2786
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2725
2787
  401: ClientAuthenticationError,
2726
2788
  404: ResourceNotFoundError,
2727
2789
  409: ResourceExistsError,
@@ -2783,9 +2845,9 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2783
2845
  headers=_headers,
2784
2846
  params=_params,
2785
2847
  )
2786
- _request = _convert_request(_request)
2787
2848
  _request.url = self._client.format_url(_request.url)
2788
2849
 
2850
+ _decompress = kwargs.pop("decompress", True)
2789
2851
  _stream = True
2790
2852
  pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
2791
2853
  _request, stream=_stream, **kwargs
@@ -2794,6 +2856,10 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2794
2856
  response = pipeline_response.http_response
2795
2857
 
2796
2858
  if response.status_code not in [200, 206]:
2859
+ try:
2860
+ await response.read() # Load the body in memory and close the socket
2861
+ except (StreamConsumedError, StreamClosedError):
2862
+ pass
2797
2863
  map_error(status_code=response.status_code, response=response, error_map=error_map)
2798
2864
  error = self._deserialize.failsafe_deserialize(_models.StorageError, pipeline_response)
2799
2865
  raise HttpResponseError(response=response, model=error)
@@ -2857,8 +2923,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2857
2923
  "bytearray", response.headers.get("x-ms-blob-content-md5")
2858
2924
  )
2859
2925
 
2860
- deserialized = response.stream_download(self._client._pipeline)
2861
-
2862
2926
  if response.status_code == 206:
2863
2927
  response_headers["Last-Modified"] = self._deserialize("rfc-1123", response.headers.get("Last-Modified"))
2864
2928
  response_headers["x-ms-meta"] = self._deserialize("{str}", response.headers.get("x-ms-meta"))
@@ -2920,7 +2984,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2920
2984
  "bytearray", response.headers.get("x-ms-blob-content-md5")
2921
2985
  )
2922
2986
 
2923
- deserialized = response.stream_download(self._client._pipeline)
2987
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
2924
2988
 
2925
2989
  if cls:
2926
2990
  return cls(pipeline_response, deserialized, response_headers) # type: ignore
@@ -2938,6 +3002,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2938
3002
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
2939
3003
  **kwargs: Any
2940
3004
  ) -> _models.BlobTags:
3005
+ # pylint: disable=line-too-long
2941
3006
  """The Get Tags operation enables users to get the tags associated with a blob.
2942
3007
 
2943
3008
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -2967,7 +3032,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2967
3032
  :rtype: ~azure.storage.blob.models.BlobTags
2968
3033
  :raises ~azure.core.exceptions.HttpResponseError:
2969
3034
  """
2970
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
3035
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2971
3036
  401: ClientAuthenticationError,
2972
3037
  404: ResourceNotFoundError,
2973
3038
  409: ResourceExistsError,
@@ -3001,7 +3066,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3001
3066
  headers=_headers,
3002
3067
  params=_params,
3003
3068
  )
3004
- _request = _convert_request(_request)
3005
3069
  _request.url = self._client.format_url(_request.url)
3006
3070
 
3007
3071
  _stream = False
@@ -3024,7 +3088,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3024
3088
  response_headers["x-ms-version"] = self._deserialize("str", response.headers.get("x-ms-version"))
3025
3089
  response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
3026
3090
 
3027
- deserialized = self._deserialize("BlobTags", pipeline_response)
3091
+ deserialized = self._deserialize("BlobTags", pipeline_response.http_response)
3028
3092
 
3029
3093
  if cls:
3030
3094
  return cls(pipeline_response, deserialized, response_headers) # type: ignore
@@ -3044,6 +3108,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3044
3108
  tags: Optional[_models.BlobTags] = None,
3045
3109
  **kwargs: Any
3046
3110
  ) -> None:
3111
+ # pylint: disable=line-too-long
3047
3112
  """The Set Tags operation enables users to set tags on a blob.
3048
3113
 
3049
3114
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -3075,7 +3140,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3075
3140
  :rtype: None
3076
3141
  :raises ~azure.core.exceptions.HttpResponseError:
3077
3142
  """
3078
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
3143
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
3079
3144
  401: ClientAuthenticationError,
3080
3145
  404: ResourceNotFoundError,
3081
3146
  409: ResourceExistsError,
@@ -3117,7 +3182,6 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3117
3182
  headers=_headers,
3118
3183
  params=_params,
3119
3184
  )
3120
- _request = _convert_request(_request)
3121
3185
  _request.url = self._client.format_url(_request.url)
3122
3186
 
3123
3187
  _stream = False