azure-storage-blob 12.23.1__py3-none-any.whl → 12.24.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. azure/storage/blob/_blob_client.py +28 -7
  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 +2 -2
  5. azure/storage/blob/_container_client_helpers.py +4 -4
  6. azure/storage/blob/_deserialize.py +2 -2
  7. azure/storage/blob/_encryption.py +2 -0
  8. azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
  9. azure/storage/blob/_generated/_configuration.py +2 -2
  10. azure/storage/blob/_generated/_serialization.py +265 -150
  11. azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
  12. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  13. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +22 -4
  14. azure/storage/blob/_generated/aio/operations/_blob_operations.py +116 -26
  15. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +40 -6
  16. azure/storage/blob/_generated/aio/operations/_container_operations.py +36 -18
  17. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +32 -9
  18. azure/storage/blob/_generated/aio/operations/_service_operations.py +16 -8
  19. azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +1 -0
  20. azure/storage/blob/_generated/operations/_append_blob_operations.py +34 -8
  21. azure/storage/blob/_generated/operations/_blob_operations.py +166 -51
  22. azure/storage/blob/_generated/operations/_block_blob_operations.py +62 -12
  23. azure/storage/blob/_generated/operations/_container_operations.py +54 -36
  24. azure/storage/blob/_generated/operations/_page_blob_operations.py +49 -18
  25. azure/storage/blob/_generated/operations/_service_operations.py +24 -16
  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 +8 -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 +6 -7
  34. azure/storage/blob/_shared/policies_async.py +1 -1
  35. azure/storage/blob/_shared/uploads.py +4 -4
  36. azure/storage/blob/_shared/uploads_async.py +4 -4
  37. azure/storage/blob/_shared_access_signature.py +0 -1
  38. azure/storage/blob/_version.py +1 -1
  39. azure/storage/blob/aio/_blob_client_async.py +30 -10
  40. azure/storage/blob/aio/_blob_service_client_async.py +7 -3
  41. azure/storage/blob/aio/_container_client_async.py +4 -4
  42. azure/storage/blob/aio/_lease_async.py +1 -1
  43. azure/storage/blob/aio/_list_blobs_helper.py +1 -2
  44. azure/storage/blob/aio/_models.py +1 -2
  45. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/METADATA +10 -10
  46. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/RECORD +49 -49
  47. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/LICENSE +0 -0
  48. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/WHEEL +0 -0
  49. {azure_storage_blob-12.23.1.dist-info → azure_storage_blob-12.24.0b1.dist-info}/top_level.txt +0 -0
@@ -48,7 +48,7 @@ class AzureBlobStorage: # pylint: disable=client-accepts-api-version-keyword
48
48
  :param base_url: Service URL. Required. Default value is "".
49
49
  :type base_url: str
50
50
  :keyword version: Specifies the version of the operation to use for this request. Default value
51
- is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
51
+ is "2025-01-05". Note that overriding this default value may result in unsupported behavior.
52
52
  :paramtype version: str
53
53
  """
54
54
 
@@ -23,12 +23,12 @@ class AzureBlobStorageConfiguration: # pylint: disable=too-many-instance-attrib
23
23
  desired operation. Required.
24
24
  :type url: str
25
25
  :keyword version: Specifies the version of the operation to use for this request. Default value
26
- is "2024-08-04". Note that overriding this default value may result in unsupported behavior.
26
+ is "2025-01-05". Note that overriding this default value may result in unsupported behavior.
27
27
  :paramtype version: str
28
28
  """
29
29
 
30
30
  def __init__(self, url: str, **kwargs: Any) -> None:
31
- version: Literal["2024-08-04"] = kwargs.pop("version", "2024-08-04")
31
+ version: Literal["2025-01-05"] = kwargs.pop("version", "2025-01-05")
32
32
 
33
33
  if url is None:
34
34
  raise ValueError("Parameter 'url' must not be None.")
@@ -76,6 +76,7 @@ class AppendBlobOperations:
76
76
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
77
77
  **kwargs: Any
78
78
  ) -> None:
79
+ # pylint: disable=line-too-long
79
80
  """The Create Append Blob operation creates a new append blob.
80
81
 
81
82
  :param content_length: The length of the request. Required.
@@ -122,7 +123,7 @@ class AppendBlobOperations:
122
123
  :rtype: None
123
124
  :raises ~azure.core.exceptions.HttpResponseError:
124
125
  """
125
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
126
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
126
127
  401: ClientAuthenticationError,
127
128
  404: ResourceNotFoundError,
128
129
  409: ResourceExistsError,
@@ -252,6 +253,8 @@ class AppendBlobOperations:
252
253
  transactional_content_md5: Optional[bytes] = None,
253
254
  transactional_content_crc64: Optional[bytes] = None,
254
255
  request_id_parameter: Optional[str] = None,
256
+ structured_body_type: Optional[str] = None,
257
+ structured_content_length: Optional[int] = None,
255
258
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
256
259
  append_position_access_conditions: Optional[_models.AppendPositionAccessConditions] = None,
257
260
  cpk_info: Optional[_models.CpkInfo] = None,
@@ -259,6 +262,7 @@ class AppendBlobOperations:
259
262
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
260
263
  **kwargs: Any
261
264
  ) -> None:
265
+ # pylint: disable=line-too-long
262
266
  """The Append Block operation commits a new block of data to the end of an existing append blob.
263
267
  The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to
264
268
  AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
@@ -282,6 +286,13 @@ class AppendBlobOperations:
282
286
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
283
287
  value is None.
284
288
  :type request_id_parameter: str
289
+ :param structured_body_type: Required if the request body is a structured message. Specifies
290
+ the message schema version and properties. Default value is None.
291
+ :type structured_body_type: str
292
+ :param structured_content_length: Required if the request body is a structured message.
293
+ Specifies the length of the blob/file content inside the message body. Will always be smaller
294
+ than Content-Length. Default value is None.
295
+ :type structured_content_length: int
285
296
  :param lease_access_conditions: Parameter group. Default value is None.
286
297
  :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
287
298
  :param append_position_access_conditions: Parameter group. Default value is None.
@@ -297,7 +308,7 @@ class AppendBlobOperations:
297
308
  :rtype: None
298
309
  :raises ~azure.core.exceptions.HttpResponseError:
299
310
  """
300
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
311
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
301
312
  401: ClientAuthenticationError,
302
313
  404: ResourceNotFoundError,
303
314
  409: ResourceExistsError,
@@ -362,6 +373,8 @@ class AppendBlobOperations:
362
373
  if_none_match=_if_none_match,
363
374
  if_tags=_if_tags,
364
375
  request_id_parameter=request_id_parameter,
376
+ structured_body_type=structured_body_type,
377
+ structured_content_length=structured_content_length,
365
378
  comp=comp,
366
379
  content_type=content_type,
367
380
  version=self._config.version,
@@ -411,6 +424,9 @@ class AppendBlobOperations:
411
424
  response_headers["x-ms-encryption-scope"] = self._deserialize(
412
425
  "str", response.headers.get("x-ms-encryption-scope")
413
426
  )
427
+ response_headers["x-ms-structured-body"] = self._deserialize(
428
+ "str", response.headers.get("x-ms-structured-body")
429
+ )
414
430
 
415
431
  if cls:
416
432
  return cls(pipeline_response, None, response_headers) # type: ignore
@@ -435,6 +451,7 @@ class AppendBlobOperations:
435
451
  source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
436
452
  **kwargs: Any
437
453
  ) -> None:
454
+ # pylint: disable=line-too-long
438
455
  """The Append Block operation commits a new block of data to the end of an existing append blob
439
456
  where the contents are read from a source url. The Append Block operation is permitted only if
440
457
  the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on
@@ -485,7 +502,7 @@ class AppendBlobOperations:
485
502
  :rtype: None
486
503
  :raises ~azure.core.exceptions.HttpResponseError:
487
504
  """
488
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
505
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
489
506
  401: ClientAuthenticationError,
490
507
  404: ResourceNotFoundError,
491
508
  409: ResourceExistsError,
@@ -623,6 +640,7 @@ class AppendBlobOperations:
623
640
  append_position_access_conditions: Optional[_models.AppendPositionAccessConditions] = None,
624
641
  **kwargs: Any
625
642
  ) -> None:
643
+ # pylint: disable=line-too-long
626
644
  """The Seal operation seals the Append Blob to make it read-only. Seal is supported only on
627
645
  version 2019-12-12 version or later.
628
646
 
@@ -646,7 +664,7 @@ class AppendBlobOperations:
646
664
  :rtype: None
647
665
  :raises ~azure.core.exceptions.HttpResponseError:
648
666
  """
649
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
667
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
650
668
  401: ClientAuthenticationError,
651
669
  404: ResourceNotFoundError,
652
670
  409: ResourceExistsError,
@@ -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,
@@ -292,6 +298,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
292
298
  "str", response.headers.get("x-ms-immutability-policy-mode")
293
299
  )
294
300
  response_headers["x-ms-legal-hold"] = self._deserialize("bool", response.headers.get("x-ms-legal-hold"))
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
+ )
295
307
 
296
308
  if response.status_code == 206:
297
309
  response_headers["Last-Modified"] = self._deserialize("rfc-1123", response.headers.get("Last-Modified"))
@@ -374,6 +386,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
374
386
  "str", response.headers.get("x-ms-immutability-policy-mode")
375
387
  )
376
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
+ )
377
395
 
378
396
  deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
379
397
 
@@ -394,6 +412,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
394
412
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
395
413
  **kwargs: Any
396
414
  ) -> None:
415
+ # pylint: disable=line-too-long
397
416
  """The Get Properties operation returns all user-defined metadata, standard HTTP properties, and
398
417
  system properties for the blob. It does not return the content of the blob.
399
418
 
@@ -426,7 +445,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
426
445
  :rtype: None
427
446
  :raises ~azure.core.exceptions.HttpResponseError:
428
447
  """
429
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
448
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
430
449
  401: ClientAuthenticationError,
431
450
  404: ResourceNotFoundError,
432
451
  409: ResourceExistsError,
@@ -597,6 +616,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
597
616
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
598
617
  **kwargs: Any
599
618
  ) -> None:
619
+ # pylint: disable=line-too-long
600
620
  """If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
601
621
  permanently removed from the storage account. If the storage account's soft delete feature is
602
622
  enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible
@@ -646,7 +666,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
646
666
  :rtype: None
647
667
  :raises ~azure.core.exceptions.HttpResponseError:
648
668
  """
649
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
669
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
650
670
  401: ClientAuthenticationError,
651
671
  404: ResourceNotFoundError,
652
672
  409: ResourceExistsError,
@@ -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,
@@ -793,6 +814,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
793
814
  expires_on: Optional[str] = None,
794
815
  **kwargs: Any
795
816
  ) -> None:
817
+ # pylint: disable=line-too-long
796
818
  """Sets the time a blob will expire and be deleted.
797
819
 
798
820
  :param expiry_options: Required. Indicates mode of the expiry time. Known values are:
@@ -813,7 +835,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
813
835
  :rtype: None
814
836
  :raises ~azure.core.exceptions.HttpResponseError:
815
837
  """
816
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
838
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
817
839
  401: ClientAuthenticationError,
818
840
  404: ResourceNotFoundError,
819
841
  409: ResourceExistsError,
@@ -875,6 +897,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
875
897
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
876
898
  **kwargs: Any
877
899
  ) -> None:
900
+ # pylint: disable=line-too-long
878
901
  """The Set HTTP Headers operation sets system properties on the blob.
879
902
 
880
903
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -896,7 +919,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
896
919
  :rtype: None
897
920
  :raises ~azure.core.exceptions.HttpResponseError:
898
921
  """
899
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
922
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
900
923
  401: ClientAuthenticationError,
901
924
  404: ResourceNotFoundError,
902
925
  409: ResourceExistsError,
@@ -996,9 +1019,12 @@ class BlobOperations: # pylint: disable=too-many-public-methods
996
1019
  request_id_parameter: Optional[str] = None,
997
1020
  immutability_policy_expiry: Optional[datetime.datetime] = None,
998
1021
  immutability_policy_mode: Optional[Union[str, _models.BlobImmutabilityPolicyMode]] = None,
1022
+ snapshot: Optional[str] = None,
1023
+ version_id: Optional[str] = None,
999
1024
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1000
1025
  **kwargs: Any
1001
1026
  ) -> None:
1027
+ # pylint: disable=line-too-long
1002
1028
  """The Set Immutability Policy operation sets the immutability policy on the blob.
1003
1029
 
1004
1030
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -1016,13 +1042,23 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1016
1042
  :param immutability_policy_mode: Specifies the immutability policy mode to set on the blob.
1017
1043
  Known values are: "Mutable", "Unlocked", and "Locked". Default value is None.
1018
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
1019
1055
  :param modified_access_conditions: Parameter group. Default value is None.
1020
1056
  :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
1021
1057
  :return: None or the result of cls(response)
1022
1058
  :rtype: None
1023
1059
  :raises ~azure.core.exceptions.HttpResponseError:
1024
1060
  """
1025
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1061
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1026
1062
  401: ClientAuthenticationError,
1027
1063
  404: ResourceNotFoundError,
1028
1064
  409: ResourceExistsError,
@@ -1047,6 +1083,8 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1047
1083
  if_unmodified_since=_if_unmodified_since,
1048
1084
  immutability_policy_expiry=immutability_policy_expiry,
1049
1085
  immutability_policy_mode=immutability_policy_mode,
1086
+ snapshot=snapshot,
1087
+ version_id=version_id,
1050
1088
  comp=comp,
1051
1089
  version=self._config.version,
1052
1090
  headers=_headers,
@@ -1085,8 +1123,14 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1085
1123
 
1086
1124
  @distributed_trace_async
1087
1125
  async def delete_immutability_policy( # pylint: disable=inconsistent-return-statements
1088
- 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
1089
1132
  ) -> None:
1133
+ # pylint: disable=line-too-long
1090
1134
  """The Delete Immutability Policy operation deletes the immutability policy on the blob.
1091
1135
 
1092
1136
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -1098,11 +1142,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1098
1142
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
1099
1143
  value is None.
1100
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
1101
1155
  :return: None or the result of cls(response)
1102
1156
  :rtype: None
1103
1157
  :raises ~azure.core.exceptions.HttpResponseError:
1104
1158
  """
1105
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1159
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1106
1160
  401: ClientAuthenticationError,
1107
1161
  404: ResourceNotFoundError,
1108
1162
  409: ResourceExistsError,
@@ -1120,6 +1174,8 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1120
1174
  url=self._config.url,
1121
1175
  timeout=timeout,
1122
1176
  request_id_parameter=request_id_parameter,
1177
+ snapshot=snapshot,
1178
+ version_id=version_id,
1123
1179
  comp=comp,
1124
1180
  version=self._config.version,
1125
1181
  headers=_headers,
@@ -1152,8 +1208,15 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1152
1208
 
1153
1209
  @distributed_trace_async
1154
1210
  async def set_legal_hold( # pylint: disable=inconsistent-return-statements
1155
- 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
1156
1218
  ) -> None:
1219
+ # pylint: disable=line-too-long
1157
1220
  """The Set Legal Hold operation sets a legal hold on the blob.
1158
1221
 
1159
1222
  :param legal_hold: Specified if a legal hold should be set on the blob. Required.
@@ -1167,11 +1230,21 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1167
1230
  limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
1168
1231
  value is None.
1169
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
1170
1243
  :return: None or the result of cls(response)
1171
1244
  :rtype: None
1172
1245
  :raises ~azure.core.exceptions.HttpResponseError:
1173
1246
  """
1174
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1247
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1175
1248
  401: ClientAuthenticationError,
1176
1249
  404: ResourceNotFoundError,
1177
1250
  409: ResourceExistsError,
@@ -1190,6 +1263,8 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1190
1263
  legal_hold=legal_hold,
1191
1264
  timeout=timeout,
1192
1265
  request_id_parameter=request_id_parameter,
1266
+ snapshot=snapshot,
1267
+ version_id=version_id,
1193
1268
  comp=comp,
1194
1269
  version=self._config.version,
1195
1270
  headers=_headers,
@@ -1233,6 +1308,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1233
1308
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1234
1309
  **kwargs: Any
1235
1310
  ) -> None:
1311
+ # pylint: disable=line-too-long
1236
1312
  """The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or
1237
1313
  more name-value pairs.
1238
1314
 
@@ -1265,7 +1341,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1265
1341
  :rtype: None
1266
1342
  :raises ~azure.core.exceptions.HttpResponseError:
1267
1343
  """
1268
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1344
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1269
1345
  401: ClientAuthenticationError,
1270
1346
  404: ResourceNotFoundError,
1271
1347
  409: ResourceExistsError,
@@ -1371,6 +1447,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1371
1447
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1372
1448
  **kwargs: Any
1373
1449
  ) -> None:
1450
+ # pylint: disable=line-too-long
1374
1451
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1375
1452
  operations.
1376
1453
 
@@ -1397,7 +1474,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1397
1474
  :rtype: None
1398
1475
  :raises ~azure.core.exceptions.HttpResponseError:
1399
1476
  """
1400
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1477
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1401
1478
  401: ClientAuthenticationError,
1402
1479
  404: ResourceNotFoundError,
1403
1480
  409: ResourceExistsError,
@@ -1478,6 +1555,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1478
1555
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1479
1556
  **kwargs: Any
1480
1557
  ) -> None:
1558
+ # pylint: disable=line-too-long
1481
1559
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1482
1560
  operations.
1483
1561
 
@@ -1498,7 +1576,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1498
1576
  :rtype: None
1499
1577
  :raises ~azure.core.exceptions.HttpResponseError:
1500
1578
  """
1501
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1579
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1502
1580
  401: ClientAuthenticationError,
1503
1581
  404: ResourceNotFoundError,
1504
1582
  409: ResourceExistsError,
@@ -1577,6 +1655,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1577
1655
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1578
1656
  **kwargs: Any
1579
1657
  ) -> None:
1658
+ # pylint: disable=line-too-long
1580
1659
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1581
1660
  operations.
1582
1661
 
@@ -1597,7 +1676,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1597
1676
  :rtype: None
1598
1677
  :raises ~azure.core.exceptions.HttpResponseError:
1599
1678
  """
1600
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1679
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1601
1680
  401: ClientAuthenticationError,
1602
1681
  404: ResourceNotFoundError,
1603
1682
  409: ResourceExistsError,
@@ -1678,6 +1757,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1678
1757
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1679
1758
  **kwargs: Any
1680
1759
  ) -> None:
1760
+ # pylint: disable=line-too-long
1681
1761
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1682
1762
  operations.
1683
1763
 
@@ -1702,7 +1782,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1702
1782
  :rtype: None
1703
1783
  :raises ~azure.core.exceptions.HttpResponseError:
1704
1784
  """
1705
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1785
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1706
1786
  401: ClientAuthenticationError,
1707
1787
  404: ResourceNotFoundError,
1708
1788
  409: ResourceExistsError,
@@ -1783,6 +1863,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1783
1863
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1784
1864
  **kwargs: Any
1785
1865
  ) -> None:
1866
+ # pylint: disable=line-too-long
1786
1867
  """[Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
1787
1868
  operations.
1788
1869
 
@@ -1809,7 +1890,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1809
1890
  :rtype: None
1810
1891
  :raises ~azure.core.exceptions.HttpResponseError:
1811
1892
  """
1812
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
1893
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1813
1894
  401: ClientAuthenticationError,
1814
1895
  404: ResourceNotFoundError,
1815
1896
  409: ResourceExistsError,
@@ -1892,6 +1973,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1892
1973
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
1893
1974
  **kwargs: Any
1894
1975
  ) -> None:
1976
+ # pylint: disable=line-too-long
1895
1977
  """The Create Snapshot operation creates a read-only snapshot of a blob.
1896
1978
 
1897
1979
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -1923,7 +2005,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
1923
2005
  :rtype: None
1924
2006
  :raises ~azure.core.exceptions.HttpResponseError:
1925
2007
  """
1926
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2008
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1927
2009
  401: ClientAuthenticationError,
1928
2010
  404: ResourceNotFoundError,
1929
2011
  409: ResourceExistsError,
@@ -2033,6 +2115,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2033
2115
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
2034
2116
  **kwargs: Any
2035
2117
  ) -> None:
2118
+ # pylint: disable=line-too-long
2036
2119
  """The Start Copy From URL operation copies a blob or an internet resource to a new blob.
2037
2120
 
2038
2121
  :param copy_source: Specifies the name of the source page blob snapshot. This value is a URL of
@@ -2089,7 +2172,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2089
2172
  :rtype: None
2090
2173
  :raises ~azure.core.exceptions.HttpResponseError:
2091
2174
  """
2092
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2175
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2093
2176
  401: ClientAuthenticationError,
2094
2177
  404: ResourceNotFoundError,
2095
2178
  409: ResourceExistsError,
@@ -2207,6 +2290,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2207
2290
  cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
2208
2291
  **kwargs: Any
2209
2292
  ) -> None:
2293
+ # pylint: disable=line-too-long
2210
2294
  """The Copy From URL operation copies a blob or an internet resource to a new blob. It will not
2211
2295
  return a response until the copy is complete.
2212
2296
 
@@ -2270,7 +2354,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2270
2354
  :rtype: None
2271
2355
  :raises ~azure.core.exceptions.HttpResponseError:
2272
2356
  """
2273
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2357
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2274
2358
  401: ClientAuthenticationError,
2275
2359
  404: ResourceNotFoundError,
2276
2360
  409: ResourceExistsError,
@@ -2389,6 +2473,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2389
2473
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
2390
2474
  **kwargs: Any
2391
2475
  ) -> None:
2476
+ # pylint: disable=line-too-long
2392
2477
  """The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a
2393
2478
  destination blob with zero length and full metadata.
2394
2479
 
@@ -2410,7 +2495,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2410
2495
  :rtype: None
2411
2496
  :raises ~azure.core.exceptions.HttpResponseError:
2412
2497
  """
2413
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2498
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2414
2499
  401: ClientAuthenticationError,
2415
2500
  404: ResourceNotFoundError,
2416
2501
  409: ResourceExistsError,
@@ -2481,6 +2566,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2481
2566
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
2482
2567
  **kwargs: Any
2483
2568
  ) -> None:
2569
+ # pylint: disable=line-too-long
2484
2570
  """The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a
2485
2571
  premium storage account and on a block blob in a blob storage account (locally redundant
2486
2572
  storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of
@@ -2521,7 +2607,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2521
2607
  :rtype: None
2522
2608
  :raises ~azure.core.exceptions.HttpResponseError:
2523
2609
  """
2524
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2610
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2525
2611
  401: ClientAuthenticationError,
2526
2612
  404: ResourceNotFoundError,
2527
2613
  409: ResourceExistsError,
@@ -2585,6 +2671,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2585
2671
  async def get_account_info( # pylint: disable=inconsistent-return-statements
2586
2672
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
2587
2673
  ) -> None:
2674
+ # pylint: disable=line-too-long
2588
2675
  """Returns the sku name and account kind.
2589
2676
 
2590
2677
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -2600,7 +2687,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2600
2687
  :rtype: None
2601
2688
  :raises ~azure.core.exceptions.HttpResponseError:
2602
2689
  """
2603
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2690
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2604
2691
  401: ClientAuthenticationError,
2605
2692
  404: ResourceNotFoundError,
2606
2693
  409: ResourceExistsError,
@@ -2665,6 +2752,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2665
2752
  query_request: Optional[_models.QueryRequest] = None,
2666
2753
  **kwargs: Any
2667
2754
  ) -> AsyncIterator[bytes]:
2755
+ # pylint: disable=line-too-long
2668
2756
  """The Query operation enables users to select/project on blob data by providing simple query
2669
2757
  expressions.
2670
2758
 
@@ -2695,7 +2783,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2695
2783
  :rtype: AsyncIterator[bytes]
2696
2784
  :raises ~azure.core.exceptions.HttpResponseError:
2697
2785
  """
2698
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
2786
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2699
2787
  401: ClientAuthenticationError,
2700
2788
  404: ResourceNotFoundError,
2701
2789
  409: ResourceExistsError,
@@ -2914,6 +3002,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2914
3002
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
2915
3003
  **kwargs: Any
2916
3004
  ) -> _models.BlobTags:
3005
+ # pylint: disable=line-too-long
2917
3006
  """The Get Tags operation enables users to get the tags associated with a blob.
2918
3007
 
2919
3008
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -2943,7 +3032,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
2943
3032
  :rtype: ~azure.storage.blob.models.BlobTags
2944
3033
  :raises ~azure.core.exceptions.HttpResponseError:
2945
3034
  """
2946
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
3035
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
2947
3036
  401: ClientAuthenticationError,
2948
3037
  404: ResourceNotFoundError,
2949
3038
  409: ResourceExistsError,
@@ -3019,6 +3108,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3019
3108
  tags: Optional[_models.BlobTags] = None,
3020
3109
  **kwargs: Any
3021
3110
  ) -> None:
3111
+ # pylint: disable=line-too-long
3022
3112
  """The Set Tags operation enables users to set tags on a blob.
3023
3113
 
3024
3114
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
@@ -3050,7 +3140,7 @@ class BlobOperations: # pylint: disable=too-many-public-methods
3050
3140
  :rtype: None
3051
3141
  :raises ~azure.core.exceptions.HttpResponseError:
3052
3142
  """
3053
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
3143
+ error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
3054
3144
  401: ClientAuthenticationError,
3055
3145
  404: ResourceNotFoundError,
3056
3146
  409: ResourceExistsError,