azure-storage-blob 12.20.0b1__py3-none-any.whl → 12.21.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 (50) hide show
  1. azure/storage/blob/__init__.py +12 -2
  2. azure/storage/blob/_blob_client.py +64 -51
  3. azure/storage/blob/_blob_service_client.py +17 -12
  4. azure/storage/blob/_container_client.py +33 -23
  5. azure/storage/blob/_download.py +277 -167
  6. azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
  7. azure/storage/blob/_generated/_configuration.py +2 -2
  8. azure/storage/blob/_generated/_patch.py +2 -0
  9. azure/storage/blob/_generated/_serialization.py +1 -1
  10. azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
  11. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  12. azure/storage/blob/_generated/aio/_patch.py +2 -0
  13. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +10 -5
  14. azure/storage/blob/_generated/aio/operations/_blob_operations.py +45 -26
  15. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +12 -7
  16. azure/storage/blob/_generated/aio/operations/_container_operations.py +39 -20
  17. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +15 -10
  18. azure/storage/blob/_generated/aio/operations/_patch.py +3 -0
  19. azure/storage/blob/_generated/aio/operations/_service_operations.py +28 -10
  20. azure/storage/blob/_generated/models/_patch.py +3 -0
  21. azure/storage/blob/_generated/operations/_append_blob_operations.py +14 -9
  22. azure/storage/blob/_generated/operations/_blob_operations.py +76 -51
  23. azure/storage/blob/_generated/operations/_block_blob_operations.py +18 -13
  24. azure/storage/blob/_generated/operations/_container_operations.py +64 -39
  25. azure/storage/blob/_generated/operations/_page_blob_operations.py +24 -19
  26. azure/storage/blob/_generated/operations/_patch.py +3 -0
  27. azure/storage/blob/_generated/operations/_service_operations.py +43 -19
  28. azure/storage/blob/_generated/py.typed +1 -0
  29. azure/storage/blob/_lease.py +6 -5
  30. azure/storage/blob/_models.py +1 -1
  31. azure/storage/blob/_serialize.py +1 -0
  32. azure/storage/blob/_shared/authentication.py +62 -4
  33. azure/storage/blob/_shared/base_client.py +1 -1
  34. azure/storage/blob/_shared/base_client_async.py +3 -2
  35. azure/storage/blob/_shared/models.py +13 -12
  36. azure/storage/blob/_shared/shared_access_signature.py +1 -0
  37. azure/storage/blob/_shared_access_signature.py +1 -0
  38. azure/storage/blob/_version.py +1 -1
  39. azure/storage/blob/aio/__init__.py +13 -4
  40. azure/storage/blob/aio/_blob_client_async.py +50 -47
  41. azure/storage/blob/aio/_blob_service_client_async.py +11 -11
  42. azure/storage/blob/aio/_container_client_async.py +23 -20
  43. azure/storage/blob/aio/_download_async.py +317 -209
  44. azure/storage/blob/aio/_lease_async.py +6 -6
  45. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/METADATA +2 -2
  46. azure_storage_blob-12.21.0.dist-info/RECORD +82 -0
  47. azure_storage_blob-12.20.0b1.dist-info/RECORD +0 -81
  48. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/LICENSE +0 -0
  49. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/WHEEL +0 -0
  50. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0.dist-info}/top_level.txt +0 -0
@@ -6,7 +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 typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union
9
+ import sys
10
+ from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union
10
11
 
11
12
  from azure.core.exceptions import (
12
13
  ClientAuthenticationError,
@@ -45,6 +46,10 @@ from ...operations._container_operations import (
45
46
  build_submit_batch_request,
46
47
  )
47
48
 
49
+ if sys.version_info >= (3, 9):
50
+ from collections.abc import MutableMapping
51
+ else:
52
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
48
53
  T = TypeVar("T")
49
54
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
50
55
 
@@ -107,7 +112,7 @@ class ContainerOperations:
107
112
  :rtype: None
108
113
  :raises ~azure.core.exceptions.HttpResponseError:
109
114
  """
110
- error_map = {
115
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
111
116
  401: ClientAuthenticationError,
112
117
  404: ResourceNotFoundError,
113
118
  409: ResourceExistsError,
@@ -194,7 +199,7 @@ class ContainerOperations:
194
199
  :rtype: None
195
200
  :raises ~azure.core.exceptions.HttpResponseError:
196
201
  """
197
- error_map = {
202
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
198
203
  401: ClientAuthenticationError,
199
204
  404: ResourceNotFoundError,
200
205
  409: ResourceExistsError,
@@ -299,7 +304,7 @@ class ContainerOperations:
299
304
  :rtype: None
300
305
  :raises ~azure.core.exceptions.HttpResponseError:
301
306
  """
302
- error_map = {
307
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
303
308
  401: ClientAuthenticationError,
304
309
  404: ResourceNotFoundError,
305
310
  409: ResourceExistsError,
@@ -397,7 +402,7 @@ class ContainerOperations:
397
402
  :rtype: None
398
403
  :raises ~azure.core.exceptions.HttpResponseError:
399
404
  """
400
- error_map = {
405
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
401
406
  401: ClientAuthenticationError,
402
407
  404: ResourceNotFoundError,
403
408
  409: ResourceExistsError,
@@ -486,7 +491,7 @@ class ContainerOperations:
486
491
  :rtype: list[~azure.storage.blob.models.SignedIdentifier]
487
492
  :raises ~azure.core.exceptions.HttpResponseError:
488
493
  """
489
- error_map = {
494
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
490
495
  401: ClientAuthenticationError,
491
496
  404: ResourceNotFoundError,
492
497
  409: ResourceExistsError,
@@ -587,7 +592,7 @@ class ContainerOperations:
587
592
  :rtype: None
588
593
  :raises ~azure.core.exceptions.HttpResponseError:
589
594
  """
590
- error_map = {
595
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
591
596
  401: ClientAuthenticationError,
592
597
  404: ResourceNotFoundError,
593
598
  409: ResourceExistsError,
@@ -693,7 +698,7 @@ class ContainerOperations:
693
698
  :rtype: None
694
699
  :raises ~azure.core.exceptions.HttpResponseError:
695
700
  """
696
- error_map = {
701
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
697
702
  401: ClientAuthenticationError,
698
703
  404: ResourceNotFoundError,
699
704
  409: ResourceExistsError,
@@ -776,7 +781,7 @@ class ContainerOperations:
776
781
  :rtype: None
777
782
  :raises ~azure.core.exceptions.HttpResponseError:
778
783
  """
779
- error_map = {
784
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
780
785
  401: ClientAuthenticationError,
781
786
  404: ResourceNotFoundError,
782
787
  409: ResourceExistsError,
@@ -857,7 +862,7 @@ class ContainerOperations:
857
862
  :rtype: AsyncIterator[bytes]
858
863
  :raises ~azure.core.exceptions.HttpResponseError:
859
864
  """
860
- error_map = {
865
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
861
866
  401: ClientAuthenticationError,
862
867
  404: ResourceNotFoundError,
863
868
  409: ResourceExistsError,
@@ -964,7 +969,7 @@ class ContainerOperations:
964
969
  :rtype: ~azure.storage.blob.models.FilterBlobSegment
965
970
  :raises ~azure.core.exceptions.HttpResponseError:
966
971
  """
967
- error_map = {
972
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
968
973
  401: ClientAuthenticationError,
969
974
  404: ResourceNotFoundError,
970
975
  409: ResourceExistsError,
@@ -1059,7 +1064,7 @@ class ContainerOperations:
1059
1064
  :rtype: None
1060
1065
  :raises ~azure.core.exceptions.HttpResponseError:
1061
1066
  """
1062
- error_map = {
1067
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1063
1068
  401: ClientAuthenticationError,
1064
1069
  404: ResourceNotFoundError,
1065
1070
  409: ResourceExistsError,
@@ -1154,7 +1159,7 @@ class ContainerOperations:
1154
1159
  :rtype: None
1155
1160
  :raises ~azure.core.exceptions.HttpResponseError:
1156
1161
  """
1157
- error_map = {
1162
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1158
1163
  401: ClientAuthenticationError,
1159
1164
  404: ResourceNotFoundError,
1160
1165
  409: ResourceExistsError,
@@ -1247,7 +1252,7 @@ class ContainerOperations:
1247
1252
  :rtype: None
1248
1253
  :raises ~azure.core.exceptions.HttpResponseError:
1249
1254
  """
1250
- error_map = {
1255
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1251
1256
  401: ClientAuthenticationError,
1252
1257
  404: ResourceNotFoundError,
1253
1258
  409: ResourceExistsError,
@@ -1347,7 +1352,7 @@ class ContainerOperations:
1347
1352
  :rtype: None
1348
1353
  :raises ~azure.core.exceptions.HttpResponseError:
1349
1354
  """
1350
- error_map = {
1355
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1351
1356
  401: ClientAuthenticationError,
1352
1357
  404: ResourceNotFoundError,
1353
1358
  409: ResourceExistsError,
@@ -1446,7 +1451,7 @@ class ContainerOperations:
1446
1451
  :rtype: None
1447
1452
  :raises ~azure.core.exceptions.HttpResponseError:
1448
1453
  """
1449
- error_map = {
1454
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1450
1455
  401: ClientAuthenticationError,
1451
1456
  404: ResourceNotFoundError,
1452
1457
  409: ResourceExistsError,
@@ -1558,7 +1563,7 @@ class ContainerOperations:
1558
1563
  :rtype: ~azure.storage.blob.models.ListBlobsFlatSegmentResponse
1559
1564
  :raises ~azure.core.exceptions.HttpResponseError:
1560
1565
  """
1561
- error_map = {
1566
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1562
1567
  401: ClientAuthenticationError,
1563
1568
  404: ResourceNotFoundError,
1564
1569
  409: ResourceExistsError,
@@ -1670,7 +1675,7 @@ class ContainerOperations:
1670
1675
  :rtype: ~azure.storage.blob.models.ListBlobsHierarchySegmentResponse
1671
1676
  :raises ~azure.core.exceptions.HttpResponseError:
1672
1677
  """
1673
- error_map = {
1678
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1674
1679
  401: ClientAuthenticationError,
1675
1680
  404: ResourceNotFoundError,
1676
1681
  409: ResourceExistsError,
@@ -1732,14 +1737,25 @@ class ContainerOperations:
1732
1737
  return deserialized # type: ignore
1733
1738
 
1734
1739
  @distributed_trace_async
1735
- async def get_account_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
1740
+ async def get_account_info( # pylint: disable=inconsistent-return-statements
1741
+ self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
1742
+ ) -> None:
1736
1743
  """Returns the sku name and account kind.
1737
1744
 
1745
+ :param timeout: The timeout parameter is expressed in seconds. For more information, see
1746
+ :code:`<a
1747
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
1748
+ Timeouts for Blob Service Operations.</a>`. Default value is None.
1749
+ :type timeout: int
1750
+ :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
1751
+ limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
1752
+ value is None.
1753
+ :type request_id_parameter: str
1738
1754
  :return: None or the result of cls(response)
1739
1755
  :rtype: None
1740
1756
  :raises ~azure.core.exceptions.HttpResponseError:
1741
1757
  """
1742
- error_map = {
1758
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1743
1759
  401: ClientAuthenticationError,
1744
1760
  404: ResourceNotFoundError,
1745
1761
  409: ResourceExistsError,
@@ -1756,6 +1772,8 @@ class ContainerOperations:
1756
1772
 
1757
1773
  _request = build_get_account_info_request(
1758
1774
  url=self._config.url,
1775
+ timeout=timeout,
1776
+ request_id_parameter=request_id_parameter,
1759
1777
  restype=restype,
1760
1778
  comp=comp,
1761
1779
  version=self._config.version,
@@ -1786,6 +1804,7 @@ class ContainerOperations:
1786
1804
  response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
1787
1805
  response_headers["x-ms-sku-name"] = self._deserialize("str", response.headers.get("x-ms-sku-name"))
1788
1806
  response_headers["x-ms-account-kind"] = self._deserialize("str", response.headers.get("x-ms-account-kind"))
1807
+ response_headers["x-ms-is-hns-enabled"] = self._deserialize("bool", response.headers.get("x-ms-is-hns-enabled"))
1789
1808
 
1790
1809
  if cls:
1791
1810
  return cls(pipeline_response, None, response_headers) # type: ignore
@@ -7,7 +7,8 @@
7
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
  # --------------------------------------------------------------------------
9
9
  import datetime
10
- from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
10
+ import sys
11
+ from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union
11
12
 
12
13
  from azure.core.exceptions import (
13
14
  ClientAuthenticationError,
@@ -37,6 +38,10 @@ from ...operations._page_blob_operations import (
37
38
  build_upload_pages_request,
38
39
  )
39
40
 
41
+ if sys.version_info >= (3, 9):
42
+ from collections.abc import MutableMapping
43
+ else:
44
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
40
45
  T = TypeVar("T")
41
46
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
42
47
 
@@ -137,7 +142,7 @@ class PageBlobOperations:
137
142
  :rtype: None
138
143
  :raises ~azure.core.exceptions.HttpResponseError:
139
144
  """
140
- error_map = {
145
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
141
146
  401: ClientAuthenticationError,
142
147
  404: ResourceNotFoundError,
143
148
  409: ResourceExistsError,
@@ -317,7 +322,7 @@ class PageBlobOperations:
317
322
  :rtype: None
318
323
  :raises ~azure.core.exceptions.HttpResponseError:
319
324
  """
320
- error_map = {
325
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
321
326
  401: ClientAuthenticationError,
322
327
  404: ResourceNotFoundError,
323
328
  409: ResourceExistsError,
@@ -485,7 +490,7 @@ class PageBlobOperations:
485
490
  :rtype: None
486
491
  :raises ~azure.core.exceptions.HttpResponseError:
487
492
  """
488
- error_map = {
493
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
489
494
  401: ClientAuthenticationError,
490
495
  404: ResourceNotFoundError,
491
496
  409: ResourceExistsError,
@@ -663,7 +668,7 @@ class PageBlobOperations:
663
668
  :rtype: None
664
669
  :raises ~azure.core.exceptions.HttpResponseError:
665
670
  """
666
- error_map = {
671
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
667
672
  401: ClientAuthenticationError,
668
673
  404: ResourceNotFoundError,
669
674
  409: ResourceExistsError,
@@ -851,7 +856,7 @@ class PageBlobOperations:
851
856
  :rtype: ~azure.storage.blob.models.PageList
852
857
  :raises ~azure.core.exceptions.HttpResponseError:
853
858
  """
854
- error_map = {
859
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
855
860
  401: ClientAuthenticationError,
856
861
  404: ResourceNotFoundError,
857
862
  409: ResourceExistsError,
@@ -1003,7 +1008,7 @@ class PageBlobOperations:
1003
1008
  :rtype: ~azure.storage.blob.models.PageList
1004
1009
  :raises ~azure.core.exceptions.HttpResponseError:
1005
1010
  """
1006
- error_map = {
1011
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1007
1012
  401: ClientAuthenticationError,
1008
1013
  404: ResourceNotFoundError,
1009
1014
  409: ResourceExistsError,
@@ -1126,7 +1131,7 @@ class PageBlobOperations:
1126
1131
  :rtype: None
1127
1132
  :raises ~azure.core.exceptions.HttpResponseError:
1128
1133
  """
1129
- error_map = {
1134
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1130
1135
  401: ClientAuthenticationError,
1131
1136
  404: ResourceNotFoundError,
1132
1137
  409: ResourceExistsError,
@@ -1255,7 +1260,7 @@ class PageBlobOperations:
1255
1260
  :rtype: None
1256
1261
  :raises ~azure.core.exceptions.HttpResponseError:
1257
1262
  """
1258
- error_map = {
1263
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1259
1264
  401: ClientAuthenticationError,
1260
1265
  404: ResourceNotFoundError,
1261
1266
  409: ResourceExistsError,
@@ -1367,7 +1372,7 @@ class PageBlobOperations:
1367
1372
  :rtype: None
1368
1373
  :raises ~azure.core.exceptions.HttpResponseError:
1369
1374
  """
1370
- error_map = {
1375
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1371
1376
  401: ClientAuthenticationError,
1372
1377
  404: ResourceNotFoundError,
1373
1378
  409: ResourceExistsError,
@@ -2,6 +2,8 @@
2
2
  # Copyright (c) Microsoft Corporation.
3
3
  # Licensed under the MIT License.
4
4
  # ------------------------------------
5
+
6
+
5
7
  """Customize generated code here.
6
8
 
7
9
  Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
@@ -10,6 +12,7 @@ from typing import TYPE_CHECKING
10
12
 
11
13
  if TYPE_CHECKING:
12
14
  # pylint: disable=unused-import,ungrouped-imports
15
+
13
16
  from typing import List
14
17
  __all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level
15
18
 
@@ -6,7 +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 typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union
9
+ import sys
10
+ from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union
10
11
 
11
12
  from azure.core.exceptions import (
12
13
  ClientAuthenticationError,
@@ -35,6 +36,10 @@ from ...operations._service_operations import (
35
36
  build_submit_batch_request,
36
37
  )
37
38
 
39
+ if sys.version_info >= (3, 9):
40
+ from collections.abc import MutableMapping
41
+ else:
42
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
38
43
  T = TypeVar("T")
39
44
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
40
45
 
@@ -84,7 +89,7 @@ class ServiceOperations:
84
89
  :rtype: None
85
90
  :raises ~azure.core.exceptions.HttpResponseError:
86
91
  """
87
- error_map = {
92
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
88
93
  401: ClientAuthenticationError,
89
94
  404: ResourceNotFoundError,
90
95
  409: ResourceExistsError,
@@ -159,7 +164,7 @@ class ServiceOperations:
159
164
  :rtype: ~azure.storage.blob.models.StorageServiceProperties
160
165
  :raises ~azure.core.exceptions.HttpResponseError:
161
166
  """
162
- error_map = {
167
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
163
168
  401: ClientAuthenticationError,
164
169
  404: ResourceNotFoundError,
165
170
  409: ResourceExistsError,
@@ -234,7 +239,7 @@ class ServiceOperations:
234
239
  :rtype: ~azure.storage.blob.models.StorageServiceStats
235
240
  :raises ~azure.core.exceptions.HttpResponseError:
236
241
  """
237
- error_map = {
242
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
238
243
  401: ClientAuthenticationError,
239
244
  404: ResourceNotFoundError,
240
245
  409: ResourceExistsError,
@@ -336,7 +341,7 @@ class ServiceOperations:
336
341
  :rtype: ~azure.storage.blob.models.ListContainersSegmentResponse
337
342
  :raises ~azure.core.exceptions.HttpResponseError:
338
343
  """
339
- error_map = {
344
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
340
345
  401: ClientAuthenticationError,
341
346
  404: ResourceNotFoundError,
342
347
  409: ResourceExistsError,
@@ -418,7 +423,7 @@ class ServiceOperations:
418
423
  :rtype: ~azure.storage.blob.models.UserDelegationKey
419
424
  :raises ~azure.core.exceptions.HttpResponseError:
420
425
  """
421
- error_map = {
426
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
422
427
  401: ClientAuthenticationError,
423
428
  404: ResourceNotFoundError,
424
429
  409: ResourceExistsError,
@@ -479,14 +484,25 @@ class ServiceOperations:
479
484
  return deserialized # type: ignore
480
485
 
481
486
  @distributed_trace_async
482
- async def get_account_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
487
+ async def get_account_info( # pylint: disable=inconsistent-return-statements
488
+ self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
489
+ ) -> None:
483
490
  """Returns the sku name and account kind.
484
491
 
492
+ :param timeout: The timeout parameter is expressed in seconds. For more information, see
493
+ :code:`<a
494
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
495
+ Timeouts for Blob Service Operations.</a>`. Default value is None.
496
+ :type timeout: int
497
+ :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
498
+ limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
499
+ value is None.
500
+ :type request_id_parameter: str
485
501
  :return: None or the result of cls(response)
486
502
  :rtype: None
487
503
  :raises ~azure.core.exceptions.HttpResponseError:
488
504
  """
489
- error_map = {
505
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
490
506
  401: ClientAuthenticationError,
491
507
  404: ResourceNotFoundError,
492
508
  409: ResourceExistsError,
@@ -503,6 +519,8 @@ class ServiceOperations:
503
519
 
504
520
  _request = build_get_account_info_request(
505
521
  url=self._config.url,
522
+ timeout=timeout,
523
+ request_id_parameter=request_id_parameter,
506
524
  restype=restype,
507
525
  comp=comp,
508
526
  version=self._config.version,
@@ -566,7 +584,7 @@ class ServiceOperations:
566
584
  :rtype: AsyncIterator[bytes]
567
585
  :raises ~azure.core.exceptions.HttpResponseError:
568
586
  """
569
- error_map = {
587
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
570
588
  401: ClientAuthenticationError,
571
589
  404: ResourceNotFoundError,
572
590
  409: ResourceExistsError,
@@ -672,7 +690,7 @@ class ServiceOperations:
672
690
  :rtype: ~azure.storage.blob.models.FilterBlobSegment
673
691
  :raises ~azure.core.exceptions.HttpResponseError:
674
692
  """
675
- error_map = {
693
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
676
694
  401: ClientAuthenticationError,
677
695
  404: ResourceNotFoundError,
678
696
  409: ResourceExistsError,
@@ -2,6 +2,8 @@
2
2
  # Copyright (c) Microsoft Corporation.
3
3
  # Licensed under the MIT License.
4
4
  # ------------------------------------
5
+
6
+
5
7
  """Customize generated code here.
6
8
 
7
9
  Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
@@ -10,6 +12,7 @@ from typing import TYPE_CHECKING
10
12
 
11
13
  if TYPE_CHECKING:
12
14
  # pylint: disable=unused-import,ungrouped-imports
15
+
13
16
  from typing import List
14
17
  __all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level
15
18
 
@@ -7,7 +7,8 @@
7
7
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
  # --------------------------------------------------------------------------
9
9
  import datetime
10
- from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
10
+ import sys
11
+ from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union
11
12
 
12
13
  from azure.core.exceptions import (
13
14
  ClientAuthenticationError,
@@ -27,6 +28,10 @@ from .. import models as _models
27
28
  from .._serialization import Serializer
28
29
  from .._vendor import _convert_request
29
30
 
31
+ if sys.version_info >= (3, 9):
32
+ from collections.abc import MutableMapping
33
+ else:
34
+ from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
30
35
  T = TypeVar("T")
31
36
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
32
37
 
@@ -67,7 +72,7 @@ def build_create_request(
67
72
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
68
73
 
69
74
  blob_type: Literal["AppendBlob"] = kwargs.pop("blob_type", _headers.pop("x-ms-blob-type", "AppendBlob"))
70
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
75
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
71
76
  accept = _headers.pop("Accept", "application/xml")
72
77
 
73
78
  # Construct URL
@@ -175,7 +180,7 @@ def build_append_block_request(
175
180
 
176
181
  comp: Literal["appendblock"] = kwargs.pop("comp", _params.pop("comp", "appendblock"))
177
182
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
178
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
183
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
179
184
  accept = _headers.pop("Accept", "application/xml")
180
185
 
181
186
  # Construct URL
@@ -271,7 +276,7 @@ def build_append_block_from_url_request(
271
276
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
272
277
 
273
278
  comp: Literal["appendblock"] = kwargs.pop("comp", _params.pop("comp", "appendblock"))
274
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
279
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
275
280
  accept = _headers.pop("Accept", "application/xml")
276
281
 
277
282
  # Construct URL
@@ -369,7 +374,7 @@ def build_seal_request(
369
374
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
370
375
 
371
376
  comp: Literal["seal"] = kwargs.pop("comp", _params.pop("comp", "seal"))
372
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
377
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
373
378
  accept = _headers.pop("Accept", "application/xml")
374
379
 
375
380
  # Construct URL
@@ -489,7 +494,7 @@ class AppendBlobOperations:
489
494
  :rtype: None
490
495
  :raises ~azure.core.exceptions.HttpResponseError:
491
496
  """
492
- error_map = {
497
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
493
498
  401: ClientAuthenticationError,
494
499
  404: ResourceNotFoundError,
495
500
  409: ResourceExistsError,
@@ -665,7 +670,7 @@ class AppendBlobOperations:
665
670
  :rtype: None
666
671
  :raises ~azure.core.exceptions.HttpResponseError:
667
672
  """
668
- error_map = {
673
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
669
674
  401: ClientAuthenticationError,
670
675
  404: ResourceNotFoundError,
671
676
  409: ResourceExistsError,
@@ -854,7 +859,7 @@ class AppendBlobOperations:
854
859
  :rtype: None
855
860
  :raises ~azure.core.exceptions.HttpResponseError:
856
861
  """
857
- error_map = {
862
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
858
863
  401: ClientAuthenticationError,
859
864
  404: ResourceNotFoundError,
860
865
  409: ResourceExistsError,
@@ -1016,7 +1021,7 @@ class AppendBlobOperations:
1016
1021
  :rtype: None
1017
1022
  :raises ~azure.core.exceptions.HttpResponseError:
1018
1023
  """
1019
- error_map = {
1024
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1020
1025
  401: ClientAuthenticationError,
1021
1026
  404: ResourceNotFoundError,
1022
1027
  409: ResourceExistsError,