azure-storage-blob 12.25.1__py3-none-any.whl → 12.27.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 (67) hide show
  1. azure/storage/blob/__init__.py +3 -2
  2. azure/storage/blob/_blob_client.py +94 -41
  3. azure/storage/blob/_blob_client_helpers.py +19 -4
  4. azure/storage/blob/_blob_service_client.py +16 -13
  5. azure/storage/blob/_container_client.py +25 -22
  6. azure/storage/blob/_deserialize.py +1 -1
  7. azure/storage/blob/_download.py +7 -7
  8. azure/storage/blob/_encryption.py +177 -184
  9. azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
  10. azure/storage/blob/_generated/_configuration.py +2 -2
  11. azure/storage/blob/_generated/_utils/__init__.py +6 -0
  12. azure/storage/blob/_generated/{_serialization.py → _utils/serialization.py} +7 -25
  13. azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
  14. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  15. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +11 -14
  16. azure/storage/blob/_generated/aio/operations/_blob_operations.py +40 -64
  17. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +18 -20
  18. azure/storage/blob/_generated/aio/operations/_container_operations.py +21 -43
  19. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +18 -27
  20. azure/storage/blob/_generated/aio/operations/_service_operations.py +11 -22
  21. azure/storage/blob/_generated/models/__init__.py +2 -0
  22. azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +6 -0
  23. azure/storage/blob/_generated/models/_models_py3.py +30 -9
  24. azure/storage/blob/_generated/operations/_append_blob_operations.py +19 -20
  25. azure/storage/blob/_generated/operations/_blob_operations.py +68 -89
  26. azure/storage/blob/_generated/operations/_block_blob_operations.py +31 -27
  27. azure/storage/blob/_generated/operations/_container_operations.py +40 -62
  28. azure/storage/blob/_generated/operations/_page_blob_operations.py +31 -37
  29. azure/storage/blob/_generated/operations/_service_operations.py +20 -32
  30. azure/storage/blob/_lease.py +1 -0
  31. azure/storage/blob/_list_blobs_helper.py +1 -1
  32. azure/storage/blob/_quick_query_helper.py +20 -24
  33. azure/storage/blob/_serialize.py +2 -0
  34. azure/storage/blob/_shared/__init__.py +7 -7
  35. azure/storage/blob/_shared/authentication.py +49 -32
  36. azure/storage/blob/_shared/avro/avro_io.py +44 -42
  37. azure/storage/blob/_shared/avro/avro_io_async.py +42 -41
  38. azure/storage/blob/_shared/avro/datafile.py +24 -21
  39. azure/storage/blob/_shared/avro/datafile_async.py +15 -15
  40. azure/storage/blob/_shared/avro/schema.py +196 -217
  41. azure/storage/blob/_shared/base_client.py +82 -59
  42. azure/storage/blob/_shared/base_client_async.py +58 -51
  43. azure/storage/blob/_shared/constants.py +1 -1
  44. azure/storage/blob/_shared/models.py +94 -92
  45. azure/storage/blob/_shared/parser.py +3 -3
  46. azure/storage/blob/_shared/policies.py +186 -147
  47. azure/storage/blob/_shared/policies_async.py +53 -65
  48. azure/storage/blob/_shared/request_handlers.py +50 -45
  49. azure/storage/blob/_shared/response_handlers.py +54 -45
  50. azure/storage/blob/_shared/shared_access_signature.py +67 -71
  51. azure/storage/blob/_shared/uploads.py +56 -49
  52. azure/storage/blob/_shared/uploads_async.py +70 -58
  53. azure/storage/blob/_shared_access_signature.py +3 -1
  54. azure/storage/blob/_version.py +1 -1
  55. azure/storage/blob/aio/__init__.py +3 -2
  56. azure/storage/blob/aio/_blob_client_async.py +241 -44
  57. azure/storage/blob/aio/_blob_service_client_async.py +13 -11
  58. azure/storage/blob/aio/_container_client_async.py +28 -25
  59. azure/storage/blob/aio/_download_async.py +7 -7
  60. azure/storage/blob/aio/_lease_async.py +1 -0
  61. azure/storage/blob/aio/_quick_query_helper_async.py +194 -0
  62. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/METADATA +4 -5
  63. azure_storage_blob-12.27.0b1.dist-info/RECORD +86 -0
  64. azure_storage_blob-12.25.1.dist-info/RECORD +0 -84
  65. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/LICENSE +0 -0
  66. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/WHEEL +0 -0
  67. {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- # pylint: disable=too-many-lines
1
+ # pylint: disable=line-too-long,useless-suppression,too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6,8 +6,8 @@
6
6
  # Code generated by Microsoft (R) AutoRest Code Generator.
7
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
  # --------------------------------------------------------------------------
9
+ from collections.abc import MutableMapping
9
10
  import datetime
10
- import sys
11
11
  from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -25,7 +25,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
25
25
  from azure.core.utils import case_insensitive_dict
26
26
 
27
27
  from ... import models as _models
28
- from ..._serialization import Deserializer, Serializer
28
+ from ..._utils.serialization import Deserializer, Serializer
29
29
  from ...operations._page_blob_operations import (
30
30
  build_clear_pages_request,
31
31
  build_copy_incremental_request,
@@ -39,10 +39,6 @@ from ...operations._page_blob_operations import (
39
39
  )
40
40
  from .._configuration import AzureBlobStorageConfiguration
41
41
 
42
- if sys.version_info >= (3, 9):
43
- from collections.abc import MutableMapping
44
- else:
45
- from typing import MutableMapping # type: ignore
46
42
  T = TypeVar("T")
47
43
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
48
44
 
@@ -87,7 +83,6 @@ class PageBlobOperations:
87
83
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
88
84
  **kwargs: Any
89
85
  ) -> None:
90
- # pylint: disable=line-too-long
91
86
  """The Create operation creates a new page blob.
92
87
 
93
88
  :param content_length: The length of the request. Required.
@@ -97,7 +92,7 @@ class PageBlobOperations:
97
92
  :type blob_content_length: int
98
93
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
99
94
  :code:`<a
100
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
95
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
101
96
  Timeouts for Blob Service Operations.</a>`. Default value is None.
102
97
  :type timeout: int
103
98
  :param tier: Optional. Indicates the tier to be set on the page blob. Known values are: "P4",
@@ -287,7 +282,6 @@ class PageBlobOperations:
287
282
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
288
283
  **kwargs: Any
289
284
  ) -> None:
290
- # pylint: disable=line-too-long
291
285
  """The Upload Pages operation writes a range of pages to a page blob.
292
286
 
293
287
  :param content_length: The length of the request. Required.
@@ -302,7 +296,7 @@ class PageBlobOperations:
302
296
  :type transactional_content_crc64: bytes
303
297
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
304
298
  :code:`<a
305
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
299
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
306
300
  Timeouts for Blob Service Operations.</a>`. Default value is None.
307
301
  :type timeout: int
308
302
  :param range: Return only the bytes of the blob in the specified range. Default value is None.
@@ -475,14 +469,13 @@ class PageBlobOperations:
475
469
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
476
470
  **kwargs: Any
477
471
  ) -> None:
478
- # pylint: disable=line-too-long
479
472
  """The Clear Pages operation clears a set of pages from a page blob.
480
473
 
481
474
  :param content_length: The length of the request. Required.
482
475
  :type content_length: int
483
476
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
484
477
  :code:`<a
485
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
478
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
486
479
  Timeouts for Blob Service Operations.</a>`. Default value is None.
487
480
  :type timeout: int
488
481
  :param range: Return only the bytes of the blob in the specified range. Default value is None.
@@ -626,6 +619,7 @@ class PageBlobOperations:
626
619
  timeout: Optional[int] = None,
627
620
  request_id_parameter: Optional[str] = None,
628
621
  copy_source_authorization: Optional[str] = None,
622
+ file_request_intent: Optional[Union[str, _models.FileShareTokenIntent]] = None,
629
623
  cpk_info: Optional[_models.CpkInfo] = None,
630
624
  cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
631
625
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
@@ -634,7 +628,6 @@ class PageBlobOperations:
634
628
  source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
635
629
  **kwargs: Any
636
630
  ) -> None:
637
- # pylint: disable=line-too-long
638
631
  """The Upload Pages operation writes a range of pages to a page blob where the contents are read
639
632
  from a URL.
640
633
 
@@ -656,7 +649,7 @@ class PageBlobOperations:
656
649
  :type source_contentcrc64: bytes
657
650
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
658
651
  :code:`<a
659
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
652
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
660
653
  Timeouts for Blob Service Operations.</a>`. Default value is None.
661
654
  :type timeout: int
662
655
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -666,6 +659,8 @@ class PageBlobOperations:
666
659
  :param copy_source_authorization: Only Bearer type is supported. Credentials should be a valid
667
660
  OAuth access token to copy source. Default value is None.
668
661
  :type copy_source_authorization: str
662
+ :param file_request_intent: Valid value is backup. "backup" Default value is None.
663
+ :type file_request_intent: str or ~azure.storage.blob.models.FileShareTokenIntent
669
664
  :param cpk_info: Parameter group. Default value is None.
670
665
  :type cpk_info: ~azure.storage.blob.models.CpkInfo
671
666
  :param cpk_scope_info: Parameter group. Default value is None.
@@ -770,6 +765,7 @@ class PageBlobOperations:
770
765
  source_if_none_match=_source_if_none_match,
771
766
  request_id_parameter=request_id_parameter,
772
767
  copy_source_authorization=copy_source_authorization,
768
+ file_request_intent=file_request_intent,
773
769
  comp=comp,
774
770
  page_write=page_write,
775
771
  version=self._config.version,
@@ -829,19 +825,18 @@ class PageBlobOperations:
829
825
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
830
826
  **kwargs: Any
831
827
  ) -> _models.PageList:
832
- # pylint: disable=line-too-long
833
828
  """The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot
834
829
  of a page blob.
835
830
 
836
831
  :param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
837
832
  specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
838
833
  see :code:`<a
839
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
834
+ href="https://learn.microsoft.com/rest/api/storageservices/creating-a-snapshot-of-a-blob">Creating
840
835
  a Snapshot of a Blob.</a>`. Default value is None.
841
836
  :type snapshot: str
842
837
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
843
838
  :code:`<a
844
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
839
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
845
840
  Timeouts for Blob Service Operations.</a>`. Default value is None.
846
841
  :type timeout: int
847
842
  :param range: Return only the bytes of the blob in the specified range. Default value is None.
@@ -969,19 +964,18 @@ class PageBlobOperations:
969
964
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
970
965
  **kwargs: Any
971
966
  ) -> _models.PageList:
972
- # pylint: disable=line-too-long
973
967
  """The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that
974
968
  were changed between target blob and previous snapshot.
975
969
 
976
970
  :param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
977
971
  specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
978
972
  see :code:`<a
979
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating
973
+ href="https://learn.microsoft.com/rest/api/storageservices/creating-a-snapshot-of-a-blob">Creating
980
974
  a Snapshot of a Blob.</a>`. Default value is None.
981
975
  :type snapshot: str
982
976
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
983
977
  :code:`<a
984
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
978
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
985
979
  Timeouts for Blob Service Operations.</a>`. Default value is None.
986
980
  :type timeout: int
987
981
  :param prevsnapshot: Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a
@@ -1120,7 +1114,6 @@ class PageBlobOperations:
1120
1114
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1121
1115
  **kwargs: Any
1122
1116
  ) -> None:
1123
- # pylint: disable=line-too-long
1124
1117
  """Resize the Blob.
1125
1118
 
1126
1119
  :param blob_content_length: This header specifies the maximum size for the page blob, up to 1
@@ -1128,7 +1121,7 @@ class PageBlobOperations:
1128
1121
  :type blob_content_length: int
1129
1122
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
1130
1123
  :code:`<a
1131
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1124
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
1132
1125
  Timeouts for Blob Service Operations.</a>`. Default value is None.
1133
1126
  :type timeout: int
1134
1127
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -1247,7 +1240,6 @@ class PageBlobOperations:
1247
1240
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1248
1241
  **kwargs: Any
1249
1242
  ) -> None:
1250
- # pylint: disable=line-too-long
1251
1243
  """Update the sequence number of the blob.
1252
1244
 
1253
1245
  :param sequence_number_action: Required if the x-ms-blob-sequence-number header is set for the
@@ -1257,7 +1249,7 @@ class PageBlobOperations:
1257
1249
  :type sequence_number_action: str or ~azure.storage.blob.models.SequenceNumberActionType
1258
1250
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
1259
1251
  :code:`<a
1260
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1252
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
1261
1253
  Timeouts for Blob Service Operations.</a>`. Default value is None.
1262
1254
  :type timeout: int
1263
1255
  :param blob_sequence_number: Set for page blobs only. The sequence number is a user-controlled
@@ -1361,7 +1353,6 @@ class PageBlobOperations:
1361
1353
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
1362
1354
  **kwargs: Any
1363
1355
  ) -> None:
1364
- # pylint: disable=line-too-long
1365
1356
  """The Copy Incremental operation copies a snapshot of the source page blob to a destination page
1366
1357
  blob. The snapshot is copied such that only the differential changes between the previously
1367
1358
  copied snapshot are transferred to the destination. The copied snapshots are complete copies of
@@ -1375,7 +1366,7 @@ class PageBlobOperations:
1375
1366
  :type copy_source: str
1376
1367
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
1377
1368
  :code:`<a
1378
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1369
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
1379
1370
  Timeouts for Blob Service Operations.</a>`. Default value is None.
1380
1371
  :type timeout: int
1381
1372
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -1,3 +1,4 @@
1
+ # pylint: disable=line-too-long,useless-suppression
1
2
  # coding=utf-8
2
3
  # --------------------------------------------------------------------------
3
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -5,7 +6,7 @@
5
6
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
8
  # --------------------------------------------------------------------------
8
- import sys
9
+ from collections.abc import MutableMapping
9
10
  from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union
10
11
 
11
12
  from azure.core import AsyncPipelineClient
@@ -25,7 +26,7 @@ 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 ..._serialization import Deserializer, Serializer
29
+ from ..._utils.serialization import Deserializer, Serializer
29
30
  from ...operations._service_operations import (
30
31
  build_filter_blobs_request,
31
32
  build_get_account_info_request,
@@ -38,10 +39,6 @@ from ...operations._service_operations import (
38
39
  )
39
40
  from .._configuration import AzureBlobStorageConfiguration
40
41
 
41
- if sys.version_info >= (3, 9):
42
- from collections.abc import MutableMapping
43
- else:
44
- from typing import MutableMapping # type: ignore
45
42
  T = TypeVar("T")
46
43
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
47
44
 
@@ -73,7 +70,6 @@ class ServiceOperations:
73
70
  request_id_parameter: Optional[str] = None,
74
71
  **kwargs: Any
75
72
  ) -> None:
76
- # pylint: disable=line-too-long
77
73
  """Sets properties for a storage account's Blob service endpoint, including properties for Storage
78
74
  Analytics and CORS (Cross-Origin Resource Sharing) rules.
79
75
 
@@ -81,7 +77,7 @@ class ServiceOperations:
81
77
  :type storage_service_properties: ~azure.storage.blob.models.StorageServiceProperties
82
78
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
83
79
  :code:`<a
84
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
80
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
85
81
  Timeouts for Blob Service Operations.</a>`. Default value is None.
86
82
  :type timeout: int
87
83
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -150,13 +146,12 @@ class ServiceOperations:
150
146
  async def get_properties(
151
147
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
152
148
  ) -> _models.StorageServiceProperties:
153
- # pylint: disable=line-too-long
154
149
  """gets the properties of a storage account's Blob service, including properties for Storage
155
150
  Analytics and CORS (Cross-Origin Resource Sharing) rules.
156
151
 
157
152
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
158
153
  :code:`<a
159
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
154
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
160
155
  Timeouts for Blob Service Operations.</a>`. Default value is None.
161
156
  :type timeout: int
162
157
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -224,14 +219,13 @@ class ServiceOperations:
224
219
  async def get_statistics(
225
220
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
226
221
  ) -> _models.StorageServiceStats:
227
- # pylint: disable=line-too-long
228
222
  """Retrieves statistics related to replication for the Blob service. It is only available on the
229
223
  secondary location endpoint when read-access geo-redundant replication is enabled for the
230
224
  storage account.
231
225
 
232
226
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
233
227
  :code:`<a
234
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
228
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
235
229
  Timeouts for Blob Service Operations.</a>`. Default value is None.
236
230
  :type timeout: int
237
231
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -307,7 +301,6 @@ class ServiceOperations:
307
301
  request_id_parameter: Optional[str] = None,
308
302
  **kwargs: Any
309
303
  ) -> _models.ListContainersSegmentResponse:
310
- # pylint: disable=line-too-long
311
304
  """The List Containers Segment operation returns a list of the containers under the specified
312
305
  account.
313
306
 
@@ -333,7 +326,7 @@ class ServiceOperations:
333
326
  :type include: list[str or ~azure.storage.blob.models.ListContainersIncludeType]
334
327
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
335
328
  :code:`<a
336
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
329
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
337
330
  Timeouts for Blob Service Operations.</a>`. Default value is None.
338
331
  :type timeout: int
339
332
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -407,7 +400,6 @@ class ServiceOperations:
407
400
  request_id_parameter: Optional[str] = None,
408
401
  **kwargs: Any
409
402
  ) -> _models.UserDelegationKey:
410
- # pylint: disable=line-too-long
411
403
  """Retrieves a user delegation key for the Blob service. This is only a valid operation when using
412
404
  bearer token authentication.
413
405
 
@@ -415,7 +407,7 @@ class ServiceOperations:
415
407
  :type key_info: ~azure.storage.blob.models.KeyInfo
416
408
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
417
409
  :code:`<a
418
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
410
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
419
411
  Timeouts for Blob Service Operations.</a>`. Default value is None.
420
412
  :type timeout: int
421
413
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -489,12 +481,11 @@ class ServiceOperations:
489
481
  async def get_account_info(
490
482
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
491
483
  ) -> None:
492
- # pylint: disable=line-too-long
493
484
  """Returns the sku name and account kind.
494
485
 
495
486
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
496
487
  :code:`<a
497
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
488
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
498
489
  Timeouts for Blob Service Operations.</a>`. Default value is None.
499
490
  :type timeout: int
500
491
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -567,7 +558,6 @@ class ServiceOperations:
567
558
  request_id_parameter: Optional[str] = None,
568
559
  **kwargs: Any
569
560
  ) -> AsyncIterator[bytes]:
570
- # pylint: disable=line-too-long
571
561
  """The Batch operation allows multiple API calls to be embedded into a single HTTP request.
572
562
 
573
563
  :param content_length: The length of the request. Required.
@@ -576,7 +566,7 @@ class ServiceOperations:
576
566
  :type body: IO[bytes]
577
567
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
578
568
  :code:`<a
579
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
569
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
580
570
  Timeouts for Blob Service Operations.</a>`. Default value is None.
581
571
  :type timeout: int
582
572
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -660,14 +650,13 @@ class ServiceOperations:
660
650
  include: Optional[List[Union[str, _models.FilterBlobsIncludeItem]]] = None,
661
651
  **kwargs: Any
662
652
  ) -> _models.FilterBlobSegment:
663
- # pylint: disable=line-too-long
664
653
  """The Filter Blobs operation enables callers to list blobs across all containers whose tags match
665
654
  a given search expression. Filter blobs searches across all containers within a storage
666
655
  account but can be scoped within the expression to a single container.
667
656
 
668
657
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
669
658
  :code:`<a
670
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
659
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
671
660
  Timeouts for Blob Service Operations.</a>`. Default value is None.
672
661
  :type timeout: int
673
662
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
@@ -81,6 +81,7 @@ from ._azure_blob_storage_enums import ( # type: ignore
81
81
  CopyStatusType,
82
82
  DeleteSnapshotsOptionType,
83
83
  EncryptionAlgorithmType,
84
+ FileShareTokenIntent,
84
85
  FilterBlobsIncludeItem,
85
86
  GeoReplicationStatusType,
86
87
  LeaseDurationType,
@@ -165,6 +166,7 @@ __all__ = [
165
166
  "CopyStatusType",
166
167
  "DeleteSnapshotsOptionType",
167
168
  "EncryptionAlgorithmType",
169
+ "FileShareTokenIntent",
168
170
  "FilterBlobsIncludeItem",
169
171
  "GeoReplicationStatusType",
170
172
  "LeaseDurationType",
@@ -152,6 +152,12 @@ class EncryptionAlgorithmType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
152
152
  AES256 = "AES256"
153
153
 
154
154
 
155
+ class FileShareTokenIntent(str, Enum, metaclass=CaseInsensitiveEnumMeta):
156
+ """FileShareTokenIntent."""
157
+
158
+ BACKUP = "backup"
159
+
160
+
155
161
  class FilterBlobsIncludeItem(str, Enum, metaclass=CaseInsensitiveEnumMeta):
156
162
  """FilterBlobsIncludeItem."""
157
163
 
@@ -7,20 +7,15 @@
7
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
  # --------------------------------------------------------------------------
9
9
 
10
+ from collections.abc import MutableMapping
10
11
  import datetime
11
- import sys
12
12
  from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union
13
13
 
14
- from .. import _serialization
15
-
16
- if sys.version_info >= (3, 9):
17
- from collections.abc import MutableMapping
18
- else:
19
- from typing import MutableMapping # type: ignore
14
+ from .._utils import serialization as _serialization
20
15
 
21
16
  if TYPE_CHECKING:
22
17
  from .. import models as _models
23
- JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
18
+ JSON = MutableMapping[str, Any]
24
19
 
25
20
 
26
21
  class AccessPolicy(_serialization.Model):
@@ -2579,19 +2574,45 @@ class StorageError(_serialization.Model):
2579
2574
 
2580
2575
  :ivar message:
2581
2576
  :vartype message: str
2577
+ :ivar copy_source_status_code:
2578
+ :vartype copy_source_status_code: int
2579
+ :ivar copy_source_error_code:
2580
+ :vartype copy_source_error_code: str
2581
+ :ivar copy_source_error_message:
2582
+ :vartype copy_source_error_message: str
2582
2583
  """
2583
2584
 
2584
2585
  _attribute_map = {
2585
2586
  "message": {"key": "Message", "type": "str"},
2587
+ "copy_source_status_code": {"key": "CopySourceStatusCode", "type": "int"},
2588
+ "copy_source_error_code": {"key": "CopySourceErrorCode", "type": "str"},
2589
+ "copy_source_error_message": {"key": "CopySourceErrorMessage", "type": "str"},
2586
2590
  }
2587
2591
 
2588
- def __init__(self, *, message: Optional[str] = None, **kwargs: Any) -> None:
2592
+ def __init__(
2593
+ self,
2594
+ *,
2595
+ message: Optional[str] = None,
2596
+ copy_source_status_code: Optional[int] = None,
2597
+ copy_source_error_code: Optional[str] = None,
2598
+ copy_source_error_message: Optional[str] = None,
2599
+ **kwargs: Any
2600
+ ) -> None:
2589
2601
  """
2590
2602
  :keyword message:
2591
2603
  :paramtype message: str
2604
+ :keyword copy_source_status_code:
2605
+ :paramtype copy_source_status_code: int
2606
+ :keyword copy_source_error_code:
2607
+ :paramtype copy_source_error_code: str
2608
+ :keyword copy_source_error_message:
2609
+ :paramtype copy_source_error_message: str
2592
2610
  """
2593
2611
  super().__init__(**kwargs)
2594
2612
  self.message = message
2613
+ self.copy_source_status_code = copy_source_status_code
2614
+ self.copy_source_error_code = copy_source_error_code
2615
+ self.copy_source_error_message = copy_source_error_message
2595
2616
 
2596
2617
 
2597
2618
  class StorageServiceProperties(_serialization.Model):
@@ -1,4 +1,4 @@
1
- # pylint: disable=too-many-lines
1
+ # pylint: disable=line-too-long,useless-suppression,too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -6,8 +6,8 @@
6
6
  # Code generated by Microsoft (R) AutoRest Code Generator.
7
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
  # --------------------------------------------------------------------------
9
+ from collections.abc import MutableMapping
9
10
  import datetime
10
- import sys
11
11
  from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
12
12
 
13
13
  from azure.core import PipelineClient
@@ -26,12 +26,8 @@ from azure.core.utils import case_insensitive_dict
26
26
 
27
27
  from .. import models as _models
28
28
  from .._configuration import AzureBlobStorageConfiguration
29
- from .._serialization import Deserializer, Serializer
29
+ from .._utils.serialization import Deserializer, Serializer
30
30
 
31
- if sys.version_info >= (3, 9):
32
- from collections.abc import MutableMapping
33
- else:
34
- from typing import MutableMapping # type: ignore
35
31
  T = TypeVar("T")
36
32
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
37
33
 
@@ -72,7 +68,7 @@ def build_create_request(
72
68
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
73
69
 
74
70
  blob_type: Literal["AppendBlob"] = kwargs.pop("blob_type", _headers.pop("x-ms-blob-type", "AppendBlob"))
75
- version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
71
+ version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
76
72
  accept = _headers.pop("Accept", "application/xml")
77
73
 
78
74
  # Construct URL
@@ -182,7 +178,7 @@ def build_append_block_request(
182
178
 
183
179
  comp: Literal["appendblock"] = kwargs.pop("comp", _params.pop("comp", "appendblock"))
184
180
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
185
- version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
181
+ version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
186
182
  accept = _headers.pop("Accept", "application/xml")
187
183
 
188
184
  # Construct URL
@@ -278,13 +274,14 @@ def build_append_block_from_url_request(
278
274
  source_if_none_match: Optional[str] = None,
279
275
  request_id_parameter: Optional[str] = None,
280
276
  copy_source_authorization: Optional[str] = None,
277
+ file_request_intent: Optional[Union[str, _models.FileShareTokenIntent]] = None,
281
278
  **kwargs: Any
282
279
  ) -> HttpRequest:
283
280
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
284
281
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
285
282
 
286
283
  comp: Literal["appendblock"] = kwargs.pop("comp", _params.pop("comp", "appendblock"))
287
- version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
284
+ version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
288
285
  accept = _headers.pop("Accept", "application/xml")
289
286
 
290
287
  # Construct URL
@@ -360,6 +357,8 @@ def build_append_block_from_url_request(
360
357
  _headers["x-ms-copy-source-authorization"] = _SERIALIZER.header(
361
358
  "copy_source_authorization", copy_source_authorization, "str"
362
359
  )
360
+ if file_request_intent is not None:
361
+ _headers["x-ms-file-request-intent"] = _SERIALIZER.header("file_request_intent", file_request_intent, "str")
363
362
  _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
364
363
 
365
364
  return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
@@ -382,7 +381,7 @@ def build_seal_request(
382
381
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
383
382
 
384
383
  comp: Literal["seal"] = kwargs.pop("comp", _params.pop("comp", "seal"))
385
- version: Literal["2025-01-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-01-05"))
384
+ version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
386
385
  accept = _headers.pop("Accept", "application/xml")
387
386
 
388
387
  # Construct URL
@@ -431,7 +430,7 @@ class AppendBlobOperations:
431
430
 
432
431
  models = _models
433
432
 
434
- def __init__(self, *args, **kwargs):
433
+ def __init__(self, *args, **kwargs) -> None:
435
434
  input_args = list(args)
436
435
  self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
437
436
  self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
@@ -456,14 +455,13 @@ class AppendBlobOperations:
456
455
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
457
456
  **kwargs: Any
458
457
  ) -> None:
459
- # pylint: disable=line-too-long
460
458
  """The Create Append Blob operation creates a new append blob.
461
459
 
462
460
  :param content_length: The length of the request. Required.
463
461
  :type content_length: int
464
462
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
465
463
  :code:`<a
466
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
464
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
467
465
  Timeouts for Blob Service Operations.</a>`. Default value is None.
468
466
  :type timeout: int
469
467
  :param metadata: Optional. Specifies a user-defined name-value pair associated with the blob.
@@ -642,7 +640,6 @@ class AppendBlobOperations:
642
640
  modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
643
641
  **kwargs: Any
644
642
  ) -> None:
645
- # pylint: disable=line-too-long
646
643
  """The Append Block operation commits a new block of data to the end of an existing append blob.
647
644
  The Append Block operation is permitted only if the blob was created with x-ms-blob-type set to
648
645
  AppendBlob. Append Block is supported only on version 2015-02-21 version or later.
@@ -653,7 +650,7 @@ class AppendBlobOperations:
653
650
  :type body: IO[bytes]
654
651
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
655
652
  :code:`<a
656
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
653
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
657
654
  Timeouts for Blob Service Operations.</a>`. Default value is None.
658
655
  :type timeout: int
659
656
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -823,6 +820,7 @@ class AppendBlobOperations:
823
820
  transactional_content_md5: Optional[bytes] = None,
824
821
  request_id_parameter: Optional[str] = None,
825
822
  copy_source_authorization: Optional[str] = None,
823
+ file_request_intent: Optional[Union[str, _models.FileShareTokenIntent]] = None,
826
824
  cpk_info: Optional[_models.CpkInfo] = None,
827
825
  cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
828
826
  lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
@@ -831,7 +829,6 @@ class AppendBlobOperations:
831
829
  source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
832
830
  **kwargs: Any
833
831
  ) -> None:
834
- # pylint: disable=line-too-long
835
832
  """The Append Block operation commits a new block of data to the end of an existing append blob
836
833
  where the contents are read from a source url. The Append Block operation is permitted only if
837
834
  the blob was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on
@@ -851,7 +848,7 @@ class AppendBlobOperations:
851
848
  :type source_contentcrc64: bytes
852
849
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
853
850
  :code:`<a
854
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
851
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
855
852
  Timeouts for Blob Service Operations.</a>`. Default value is None.
856
853
  :type timeout: int
857
854
  :param transactional_content_md5: Specify the transactional md5 for the body, to be validated
@@ -864,6 +861,8 @@ class AppendBlobOperations:
864
861
  :param copy_source_authorization: Only Bearer type is supported. Credentials should be a valid
865
862
  OAuth access token to copy source. Default value is None.
866
863
  :type copy_source_authorization: str
864
+ :param file_request_intent: Valid value is backup. "backup" Default value is None.
865
+ :type file_request_intent: str or ~azure.storage.blob.models.FileShareTokenIntent
867
866
  :param cpk_info: Parameter group. Default value is None.
868
867
  :type cpk_info: ~azure.storage.blob.models.CpkInfo
869
868
  :param cpk_scope_info: Parameter group. Default value is None.
@@ -962,6 +961,7 @@ class AppendBlobOperations:
962
961
  source_if_none_match=_source_if_none_match,
963
962
  request_id_parameter=request_id_parameter,
964
963
  copy_source_authorization=copy_source_authorization,
964
+ file_request_intent=file_request_intent,
965
965
  comp=comp,
966
966
  version=self._config.version,
967
967
  headers=_headers,
@@ -1020,13 +1020,12 @@ class AppendBlobOperations:
1020
1020
  append_position_access_conditions: Optional[_models.AppendPositionAccessConditions] = None,
1021
1021
  **kwargs: Any
1022
1022
  ) -> None:
1023
- # pylint: disable=line-too-long
1024
1023
  """The Seal operation seals the Append Blob to make it read-only. Seal is supported only on
1025
1024
  version 2019-12-12 version or later.
1026
1025
 
1027
1026
  :param timeout: The timeout parameter is expressed in seconds. For more information, see
1028
1027
  :code:`<a
1029
- href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1028
+ href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
1030
1029
  Timeouts for Blob Service Operations.</a>`. Default value is None.
1031
1030
  :type timeout: int
1032
1031
  :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character