azure-storage-blob 12.20.0b1__py3-none-any.whl → 12.21.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 (45) hide show
  1. azure/storage/blob/__init__.py +12 -2
  2. azure/storage/blob/_blob_client.py +11 -3
  3. azure/storage/blob/_blob_service_client.py +6 -1
  4. azure/storage/blob/_container_client.py +11 -3
  5. azure/storage/blob/_generated/_azure_blob_storage.py +1 -1
  6. azure/storage/blob/_generated/_configuration.py +2 -2
  7. azure/storage/blob/_generated/_patch.py +2 -0
  8. azure/storage/blob/_generated/_serialization.py +1 -1
  9. azure/storage/blob/_generated/aio/_azure_blob_storage.py +1 -1
  10. azure/storage/blob/_generated/aio/_configuration.py +2 -2
  11. azure/storage/blob/_generated/aio/_patch.py +2 -0
  12. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +10 -5
  13. azure/storage/blob/_generated/aio/operations/_blob_operations.py +45 -26
  14. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +12 -7
  15. azure/storage/blob/_generated/aio/operations/_container_operations.py +39 -20
  16. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +15 -10
  17. azure/storage/blob/_generated/aio/operations/_patch.py +3 -0
  18. azure/storage/blob/_generated/aio/operations/_service_operations.py +28 -10
  19. azure/storage/blob/_generated/models/_patch.py +3 -0
  20. azure/storage/blob/_generated/operations/_append_blob_operations.py +14 -9
  21. azure/storage/blob/_generated/operations/_blob_operations.py +76 -51
  22. azure/storage/blob/_generated/operations/_block_blob_operations.py +18 -13
  23. azure/storage/blob/_generated/operations/_container_operations.py +64 -39
  24. azure/storage/blob/_generated/operations/_page_blob_operations.py +24 -19
  25. azure/storage/blob/_generated/operations/_patch.py +3 -0
  26. azure/storage/blob/_generated/operations/_service_operations.py +43 -19
  27. azure/storage/blob/_lease.py +1 -0
  28. azure/storage/blob/_serialize.py +1 -0
  29. azure/storage/blob/_shared/authentication.py +62 -4
  30. azure/storage/blob/_shared/base_client.py +1 -1
  31. azure/storage/blob/_shared/base_client_async.py +3 -2
  32. azure/storage/blob/_shared/models.py +13 -12
  33. azure/storage/blob/_shared/shared_access_signature.py +1 -0
  34. azure/storage/blob/_shared_access_signature.py +1 -0
  35. azure/storage/blob/_version.py +1 -1
  36. azure/storage/blob/aio/__init__.py +13 -4
  37. azure/storage/blob/aio/_blob_client_async.py +1 -1
  38. azure/storage/blob/aio/_blob_service_client_async.py +1 -1
  39. azure/storage/blob/aio/_container_client_async.py +1 -1
  40. azure/storage/blob/aio/_lease_async.py +1 -1
  41. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0b1.dist-info}/METADATA +6 -6
  42. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0b1.dist-info}/RECORD +45 -45
  43. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0b1.dist-info}/WHEEL +1 -1
  44. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0b1.dist-info}/LICENSE +0 -0
  45. {azure_storage_blob-12.20.0b1.dist-info → azure_storage_blob-12.21.0b1.dist-info}/top_level.txt +0 -0
@@ -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, Iterator, List, Literal, Optional, TypeVar, Union
10
+ import sys
11
+ from typing import Any, Callable, Dict, IO, Iterator, List, 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
 
@@ -49,7 +54,7 @@ def build_create_request(
49
54
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
50
55
 
51
56
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
52
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
57
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
53
58
  accept = _headers.pop("Accept", "application/xml")
54
59
 
55
60
  # Construct URL
@@ -98,7 +103,7 @@ def build_get_properties_request(
98
103
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
99
104
 
100
105
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
101
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
106
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
102
107
  accept = _headers.pop("Accept", "application/xml")
103
108
 
104
109
  # Construct URL
@@ -139,7 +144,7 @@ def build_delete_request(
139
144
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
140
145
 
141
146
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
142
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
147
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
143
148
  accept = _headers.pop("Accept", "application/xml")
144
149
 
145
150
  # Construct URL
@@ -185,7 +190,7 @@ def build_set_metadata_request(
185
190
 
186
191
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
187
192
  comp: Literal["metadata"] = kwargs.pop("comp", _params.pop("comp", "metadata"))
188
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
193
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
189
194
  accept = _headers.pop("Accept", "application/xml")
190
195
 
191
196
  # Construct URL
@@ -230,7 +235,7 @@ def build_get_access_policy_request(
230
235
 
231
236
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
232
237
  comp: Literal["acl"] = kwargs.pop("comp", _params.pop("comp", "acl"))
233
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
238
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
234
239
  accept = _headers.pop("Accept", "application/xml")
235
240
 
236
241
  # Construct URL
@@ -276,7 +281,7 @@ def build_set_access_policy_request(
276
281
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
277
282
  comp: Literal["acl"] = kwargs.pop("comp", _params.pop("comp", "acl"))
278
283
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
279
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
284
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
280
285
  accept = _headers.pop("Accept", "application/xml")
281
286
 
282
287
  # Construct URL
@@ -326,7 +331,7 @@ def build_restore_request(
326
331
 
327
332
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
328
333
  comp: Literal["undelete"] = kwargs.pop("comp", _params.pop("comp", "undelete"))
329
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
334
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
330
335
  accept = _headers.pop("Accept", "application/xml")
331
336
 
332
337
  # Construct URL
@@ -374,7 +379,7 @@ def build_rename_request(
374
379
 
375
380
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
376
381
  comp: Literal["rename"] = kwargs.pop("comp", _params.pop("comp", "rename"))
377
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
382
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
378
383
  accept = _headers.pop("Accept", "application/xml")
379
384
 
380
385
  # Construct URL
@@ -418,7 +423,7 @@ def build_submit_batch_request(
418
423
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
419
424
  comp: Literal["batch"] = kwargs.pop("comp", _params.pop("comp", "batch"))
420
425
  multipart_content_type: Optional[str] = kwargs.pop("multipart_content_type", _headers.pop("Content-Type", None))
421
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
426
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
422
427
  accept = _headers.pop("Accept", "application/xml")
423
428
 
424
429
  # Construct URL
@@ -463,7 +468,7 @@ def build_filter_blobs_request(
463
468
 
464
469
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
465
470
  comp: Literal["blobs"] = kwargs.pop("comp", _params.pop("comp", "blobs"))
466
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
471
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
467
472
  accept = _headers.pop("Accept", "application/xml")
468
473
 
469
474
  # Construct URL
@@ -514,7 +519,7 @@ def build_acquire_lease_request(
514
519
  comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
515
520
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
516
521
  action: Literal["acquire"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "acquire"))
517
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
522
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
518
523
  accept = _headers.pop("Accept", "application/xml")
519
524
 
520
525
  # Construct URL
@@ -565,7 +570,7 @@ def build_release_lease_request(
565
570
  comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
566
571
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
567
572
  action: Literal["release"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "release"))
568
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
573
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
569
574
  accept = _headers.pop("Accept", "application/xml")
570
575
 
571
576
  # Construct URL
@@ -613,7 +618,7 @@ def build_renew_lease_request(
613
618
  comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
614
619
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
615
620
  action: Literal["renew"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "renew"))
616
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
621
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
617
622
  accept = _headers.pop("Accept", "application/xml")
618
623
 
619
624
  # Construct URL
@@ -661,7 +666,7 @@ def build_break_lease_request(
661
666
  comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
662
667
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
663
668
  action: Literal["break"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "break"))
664
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
669
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
665
670
  accept = _headers.pop("Accept", "application/xml")
666
671
 
667
672
  # Construct URL
@@ -711,7 +716,7 @@ def build_change_lease_request(
711
716
  comp: Literal["lease"] = kwargs.pop("comp", _params.pop("comp", "lease"))
712
717
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
713
718
  action: Literal["change"] = kwargs.pop("action", _headers.pop("x-ms-lease-action", "change"))
714
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
719
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
715
720
  accept = _headers.pop("Accept", "application/xml")
716
721
 
717
722
  # Construct URL
@@ -760,7 +765,7 @@ def build_list_blob_flat_segment_request(
760
765
 
761
766
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
762
767
  comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
763
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
768
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
764
769
  accept = _headers.pop("Accept", "application/xml")
765
770
 
766
771
  # Construct URL
@@ -811,7 +816,7 @@ def build_list_blob_hierarchy_segment_request( # pylint: disable=name-too-long
811
816
 
812
817
  restype: Literal["container"] = kwargs.pop("restype", _params.pop("restype", "container"))
813
818
  comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
814
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
819
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
815
820
  accept = _headers.pop("Accept", "application/xml")
816
821
 
817
822
  # Construct URL
@@ -846,13 +851,15 @@ def build_list_blob_hierarchy_segment_request( # pylint: disable=name-too-long
846
851
  return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
847
852
 
848
853
 
849
- def build_get_account_info_request(url: str, **kwargs: Any) -> HttpRequest:
854
+ def build_get_account_info_request(
855
+ url: str, *, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
856
+ ) -> HttpRequest:
850
857
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
851
858
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
852
859
 
853
860
  restype: Literal["account"] = kwargs.pop("restype", _params.pop("restype", "account"))
854
861
  comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
855
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
862
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
856
863
  accept = _headers.pop("Accept", "application/xml")
857
864
 
858
865
  # Construct URL
@@ -866,9 +873,13 @@ def build_get_account_info_request(url: str, **kwargs: Any) -> HttpRequest:
866
873
  # Construct parameters
867
874
  _params["restype"] = _SERIALIZER.query("restype", restype, "str")
868
875
  _params["comp"] = _SERIALIZER.query("comp", comp, "str")
876
+ if timeout is not None:
877
+ _params["timeout"] = _SERIALIZER.query("timeout", timeout, "int", minimum=0)
869
878
 
870
879
  # Construct headers
871
880
  _headers["x-ms-version"] = _SERIALIZER.header("version", version, "str")
881
+ if request_id_parameter is not None:
882
+ _headers["x-ms-client-request-id"] = _SERIALIZER.header("request_id_parameter", request_id_parameter, "str")
872
883
  _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
873
884
 
874
885
  return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
@@ -932,7 +943,7 @@ class ContainerOperations:
932
943
  :rtype: None
933
944
  :raises ~azure.core.exceptions.HttpResponseError:
934
945
  """
935
- error_map = {
946
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
936
947
  401: ClientAuthenticationError,
937
948
  404: ResourceNotFoundError,
938
949
  409: ResourceExistsError,
@@ -1019,7 +1030,7 @@ class ContainerOperations:
1019
1030
  :rtype: None
1020
1031
  :raises ~azure.core.exceptions.HttpResponseError:
1021
1032
  """
1022
- error_map = {
1033
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1023
1034
  401: ClientAuthenticationError,
1024
1035
  404: ResourceNotFoundError,
1025
1036
  409: ResourceExistsError,
@@ -1124,7 +1135,7 @@ class ContainerOperations:
1124
1135
  :rtype: None
1125
1136
  :raises ~azure.core.exceptions.HttpResponseError:
1126
1137
  """
1127
- error_map = {
1138
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1128
1139
  401: ClientAuthenticationError,
1129
1140
  404: ResourceNotFoundError,
1130
1141
  409: ResourceExistsError,
@@ -1222,7 +1233,7 @@ class ContainerOperations:
1222
1233
  :rtype: None
1223
1234
  :raises ~azure.core.exceptions.HttpResponseError:
1224
1235
  """
1225
- error_map = {
1236
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1226
1237
  401: ClientAuthenticationError,
1227
1238
  404: ResourceNotFoundError,
1228
1239
  409: ResourceExistsError,
@@ -1311,7 +1322,7 @@ class ContainerOperations:
1311
1322
  :rtype: list[~azure.storage.blob.models.SignedIdentifier]
1312
1323
  :raises ~azure.core.exceptions.HttpResponseError:
1313
1324
  """
1314
- error_map = {
1325
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1315
1326
  401: ClientAuthenticationError,
1316
1327
  404: ResourceNotFoundError,
1317
1328
  409: ResourceExistsError,
@@ -1412,7 +1423,7 @@ class ContainerOperations:
1412
1423
  :rtype: None
1413
1424
  :raises ~azure.core.exceptions.HttpResponseError:
1414
1425
  """
1415
- error_map = {
1426
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1416
1427
  401: ClientAuthenticationError,
1417
1428
  404: ResourceNotFoundError,
1418
1429
  409: ResourceExistsError,
@@ -1518,7 +1529,7 @@ class ContainerOperations:
1518
1529
  :rtype: None
1519
1530
  :raises ~azure.core.exceptions.HttpResponseError:
1520
1531
  """
1521
- error_map = {
1532
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1522
1533
  401: ClientAuthenticationError,
1523
1534
  404: ResourceNotFoundError,
1524
1535
  409: ResourceExistsError,
@@ -1601,7 +1612,7 @@ class ContainerOperations:
1601
1612
  :rtype: None
1602
1613
  :raises ~azure.core.exceptions.HttpResponseError:
1603
1614
  """
1604
- error_map = {
1615
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1605
1616
  401: ClientAuthenticationError,
1606
1617
  404: ResourceNotFoundError,
1607
1618
  409: ResourceExistsError,
@@ -1682,7 +1693,7 @@ class ContainerOperations:
1682
1693
  :rtype: Iterator[bytes]
1683
1694
  :raises ~azure.core.exceptions.HttpResponseError:
1684
1695
  """
1685
- error_map = {
1696
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1686
1697
  401: ClientAuthenticationError,
1687
1698
  404: ResourceNotFoundError,
1688
1699
  409: ResourceExistsError,
@@ -1789,7 +1800,7 @@ class ContainerOperations:
1789
1800
  :rtype: ~azure.storage.blob.models.FilterBlobSegment
1790
1801
  :raises ~azure.core.exceptions.HttpResponseError:
1791
1802
  """
1792
- error_map = {
1803
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1793
1804
  401: ClientAuthenticationError,
1794
1805
  404: ResourceNotFoundError,
1795
1806
  409: ResourceExistsError,
@@ -1884,7 +1895,7 @@ class ContainerOperations:
1884
1895
  :rtype: None
1885
1896
  :raises ~azure.core.exceptions.HttpResponseError:
1886
1897
  """
1887
- error_map = {
1898
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1888
1899
  401: ClientAuthenticationError,
1889
1900
  404: ResourceNotFoundError,
1890
1901
  409: ResourceExistsError,
@@ -1979,7 +1990,7 @@ class ContainerOperations:
1979
1990
  :rtype: None
1980
1991
  :raises ~azure.core.exceptions.HttpResponseError:
1981
1992
  """
1982
- error_map = {
1993
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1983
1994
  401: ClientAuthenticationError,
1984
1995
  404: ResourceNotFoundError,
1985
1996
  409: ResourceExistsError,
@@ -2072,7 +2083,7 @@ class ContainerOperations:
2072
2083
  :rtype: None
2073
2084
  :raises ~azure.core.exceptions.HttpResponseError:
2074
2085
  """
2075
- error_map = {
2086
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2076
2087
  401: ClientAuthenticationError,
2077
2088
  404: ResourceNotFoundError,
2078
2089
  409: ResourceExistsError,
@@ -2172,7 +2183,7 @@ class ContainerOperations:
2172
2183
  :rtype: None
2173
2184
  :raises ~azure.core.exceptions.HttpResponseError:
2174
2185
  """
2175
- error_map = {
2186
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2176
2187
  401: ClientAuthenticationError,
2177
2188
  404: ResourceNotFoundError,
2178
2189
  409: ResourceExistsError,
@@ -2271,7 +2282,7 @@ class ContainerOperations:
2271
2282
  :rtype: None
2272
2283
  :raises ~azure.core.exceptions.HttpResponseError:
2273
2284
  """
2274
- error_map = {
2285
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2275
2286
  401: ClientAuthenticationError,
2276
2287
  404: ResourceNotFoundError,
2277
2288
  409: ResourceExistsError,
@@ -2383,7 +2394,7 @@ class ContainerOperations:
2383
2394
  :rtype: ~azure.storage.blob.models.ListBlobsFlatSegmentResponse
2384
2395
  :raises ~azure.core.exceptions.HttpResponseError:
2385
2396
  """
2386
- error_map = {
2397
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2387
2398
  401: ClientAuthenticationError,
2388
2399
  404: ResourceNotFoundError,
2389
2400
  409: ResourceExistsError,
@@ -2495,7 +2506,7 @@ class ContainerOperations:
2495
2506
  :rtype: ~azure.storage.blob.models.ListBlobsHierarchySegmentResponse
2496
2507
  :raises ~azure.core.exceptions.HttpResponseError:
2497
2508
  """
2498
- error_map = {
2509
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2499
2510
  401: ClientAuthenticationError,
2500
2511
  404: ResourceNotFoundError,
2501
2512
  409: ResourceExistsError,
@@ -2557,14 +2568,25 @@ class ContainerOperations:
2557
2568
  return deserialized # type: ignore
2558
2569
 
2559
2570
  @distributed_trace
2560
- def get_account_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
2571
+ def get_account_info( # pylint: disable=inconsistent-return-statements
2572
+ self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
2573
+ ) -> None:
2561
2574
  """Returns the sku name and account kind.
2562
2575
 
2576
+ :param timeout: The timeout parameter is expressed in seconds. For more information, see
2577
+ :code:`<a
2578
+ href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
2579
+ Timeouts for Blob Service Operations.</a>`. Default value is None.
2580
+ :type timeout: int
2581
+ :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
2582
+ limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
2583
+ value is None.
2584
+ :type request_id_parameter: str
2563
2585
  :return: None or the result of cls(response)
2564
2586
  :rtype: None
2565
2587
  :raises ~azure.core.exceptions.HttpResponseError:
2566
2588
  """
2567
- error_map = {
2589
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2568
2590
  401: ClientAuthenticationError,
2569
2591
  404: ResourceNotFoundError,
2570
2592
  409: ResourceExistsError,
@@ -2581,6 +2603,8 @@ class ContainerOperations:
2581
2603
 
2582
2604
  _request = build_get_account_info_request(
2583
2605
  url=self._config.url,
2606
+ timeout=timeout,
2607
+ request_id_parameter=request_id_parameter,
2584
2608
  restype=restype,
2585
2609
  comp=comp,
2586
2610
  version=self._config.version,
@@ -2611,6 +2635,7 @@ class ContainerOperations:
2611
2635
  response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
2612
2636
  response_headers["x-ms-sku-name"] = self._deserialize("str", response.headers.get("x-ms-sku-name"))
2613
2637
  response_headers["x-ms-account-kind"] = self._deserialize("str", response.headers.get("x-ms-account-kind"))
2638
+ response_headers["x-ms-is-hns-enabled"] = self._deserialize("bool", response.headers.get("x-ms-is-hns-enabled"))
2614
2639
 
2615
2640
  if cls:
2616
2641
  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,
@@ -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
 
@@ -70,7 +75,7 @@ def build_create_request(
70
75
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
71
76
 
72
77
  blob_type: Literal["PageBlob"] = kwargs.pop("blob_type", _headers.pop("x-ms-blob-type", "PageBlob"))
73
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
78
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
74
79
  accept = _headers.pop("Accept", "application/xml")
75
80
 
76
81
  # Construct URL
@@ -186,7 +191,7 @@ def build_upload_pages_request(
186
191
  comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
187
192
  page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
188
193
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
189
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
194
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
190
195
  accept = _headers.pop("Accept", "application/xml")
191
196
 
192
197
  # Construct URL
@@ -286,7 +291,7 @@ def build_clear_pages_request(
286
291
 
287
292
  comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
288
293
  page_write: Literal["clear"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "clear"))
289
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
294
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
290
295
  accept = _headers.pop("Accept", "application/xml")
291
296
 
292
297
  # Construct URL
@@ -385,7 +390,7 @@ def build_upload_pages_from_url_request(
385
390
 
386
391
  comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
387
392
  page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
388
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
393
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
389
394
  accept = _headers.pop("Accept", "application/xml")
390
395
 
391
396
  # Construct URL
@@ -492,7 +497,7 @@ def build_get_page_ranges_request(
492
497
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
493
498
 
494
499
  comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
495
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
500
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
496
501
  accept = _headers.pop("Accept", "application/xml")
497
502
 
498
503
  # Construct URL
@@ -560,7 +565,7 @@ def build_get_page_ranges_diff_request(
560
565
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
561
566
 
562
567
  comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
563
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
568
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
564
569
  accept = _headers.pop("Accept", "application/xml")
565
570
 
566
571
  # Construct URL
@@ -631,7 +636,7 @@ def build_resize_request(
631
636
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
632
637
 
633
638
  comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
634
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
639
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
635
640
  accept = _headers.pop("Accept", "application/xml")
636
641
 
637
642
  # Construct URL
@@ -698,7 +703,7 @@ def build_update_sequence_number_request(
698
703
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
699
704
 
700
705
  comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
701
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
706
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
702
707
  accept = _headers.pop("Accept", "application/xml")
703
708
 
704
709
  # Construct URL
@@ -757,7 +762,7 @@ def build_copy_incremental_request(
757
762
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
758
763
 
759
764
  comp: Literal["incrementalcopy"] = kwargs.pop("comp", _params.pop("comp", "incrementalcopy"))
760
- version: Literal["2021-12-02"] = kwargs.pop("version", _headers.pop("x-ms-version", "2021-12-02"))
765
+ version: Literal["2024-08-04"] = kwargs.pop("version", _headers.pop("x-ms-version", "2024-08-04"))
761
766
  accept = _headers.pop("Accept", "application/xml")
762
767
 
763
768
  # Construct URL
@@ -889,7 +894,7 @@ class PageBlobOperations:
889
894
  :rtype: None
890
895
  :raises ~azure.core.exceptions.HttpResponseError:
891
896
  """
892
- error_map = {
897
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
893
898
  401: ClientAuthenticationError,
894
899
  404: ResourceNotFoundError,
895
900
  409: ResourceExistsError,
@@ -1069,7 +1074,7 @@ class PageBlobOperations:
1069
1074
  :rtype: None
1070
1075
  :raises ~azure.core.exceptions.HttpResponseError:
1071
1076
  """
1072
- error_map = {
1077
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1073
1078
  401: ClientAuthenticationError,
1074
1079
  404: ResourceNotFoundError,
1075
1080
  409: ResourceExistsError,
@@ -1237,7 +1242,7 @@ class PageBlobOperations:
1237
1242
  :rtype: None
1238
1243
  :raises ~azure.core.exceptions.HttpResponseError:
1239
1244
  """
1240
- error_map = {
1245
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1241
1246
  401: ClientAuthenticationError,
1242
1247
  404: ResourceNotFoundError,
1243
1248
  409: ResourceExistsError,
@@ -1415,7 +1420,7 @@ class PageBlobOperations:
1415
1420
  :rtype: None
1416
1421
  :raises ~azure.core.exceptions.HttpResponseError:
1417
1422
  """
1418
- error_map = {
1423
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1419
1424
  401: ClientAuthenticationError,
1420
1425
  404: ResourceNotFoundError,
1421
1426
  409: ResourceExistsError,
@@ -1603,7 +1608,7 @@ class PageBlobOperations:
1603
1608
  :rtype: ~azure.storage.blob.models.PageList
1604
1609
  :raises ~azure.core.exceptions.HttpResponseError:
1605
1610
  """
1606
- error_map = {
1611
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1607
1612
  401: ClientAuthenticationError,
1608
1613
  404: ResourceNotFoundError,
1609
1614
  409: ResourceExistsError,
@@ -1755,7 +1760,7 @@ class PageBlobOperations:
1755
1760
  :rtype: ~azure.storage.blob.models.PageList
1756
1761
  :raises ~azure.core.exceptions.HttpResponseError:
1757
1762
  """
1758
- error_map = {
1763
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1759
1764
  401: ClientAuthenticationError,
1760
1765
  404: ResourceNotFoundError,
1761
1766
  409: ResourceExistsError,
@@ -1878,7 +1883,7 @@ class PageBlobOperations:
1878
1883
  :rtype: None
1879
1884
  :raises ~azure.core.exceptions.HttpResponseError:
1880
1885
  """
1881
- error_map = {
1886
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
1882
1887
  401: ClientAuthenticationError,
1883
1888
  404: ResourceNotFoundError,
1884
1889
  409: ResourceExistsError,
@@ -2007,7 +2012,7 @@ class PageBlobOperations:
2007
2012
  :rtype: None
2008
2013
  :raises ~azure.core.exceptions.HttpResponseError:
2009
2014
  """
2010
- error_map = {
2015
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2011
2016
  401: ClientAuthenticationError,
2012
2017
  404: ResourceNotFoundError,
2013
2018
  409: ResourceExistsError,
@@ -2119,7 +2124,7 @@ class PageBlobOperations:
2119
2124
  :rtype: None
2120
2125
  :raises ~azure.core.exceptions.HttpResponseError:
2121
2126
  """
2122
- error_map = {
2127
+ error_map: MutableMapping[int, Type[HttpResponseError]] = {
2123
2128
  401: ClientAuthenticationError,
2124
2129
  404: ResourceNotFoundError,
2125
2130
  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