azure-mgmt-storage 23.0.1__py3-none-any.whl → 24.0.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 (63) hide show
  1. azure/mgmt/storage/_configuration.py +15 -4
  2. azure/mgmt/storage/_storage_management_client.py +18 -4
  3. azure/mgmt/storage/_utils/serialization.py +12 -14
  4. azure/mgmt/storage/_version.py +1 -1
  5. azure/mgmt/storage/aio/_configuration.py +15 -4
  6. azure/mgmt/storage/aio/_storage_management_client.py +18 -4
  7. azure/mgmt/storage/aio/operations/_blob_containers_operations.py +9 -5
  8. azure/mgmt/storage/aio/operations/_blob_inventory_policies_operations.py +3 -2
  9. azure/mgmt/storage/aio/operations/_blob_services_operations.py +3 -2
  10. azure/mgmt/storage/aio/operations/_deleted_accounts_operations.py +3 -2
  11. azure/mgmt/storage/aio/operations/_encryption_scopes_operations.py +3 -2
  12. azure/mgmt/storage/aio/operations/_file_services_operations.py +3 -2
  13. azure/mgmt/storage/aio/operations/_file_shares_operations.py +5 -3
  14. azure/mgmt/storage/aio/operations/_local_users_operations.py +3 -2
  15. azure/mgmt/storage/aio/operations/_management_policies_operations.py +3 -2
  16. azure/mgmt/storage/aio/operations/_network_security_perimeter_configurations_operations.py +3 -2
  17. azure/mgmt/storage/aio/operations/_object_replication_policies_operations.py +3 -2
  18. azure/mgmt/storage/aio/operations/_operations.py +3 -2
  19. azure/mgmt/storage/aio/operations/_private_endpoint_connections_operations.py +3 -2
  20. azure/mgmt/storage/aio/operations/_private_link_resources_operations.py +3 -2
  21. azure/mgmt/storage/aio/operations/_queue_operations.py +3 -2
  22. azure/mgmt/storage/aio/operations/_queue_services_operations.py +3 -2
  23. azure/mgmt/storage/aio/operations/_skus_operations.py +3 -2
  24. azure/mgmt/storage/aio/operations/_storage_accounts_operations.py +3 -2
  25. azure/mgmt/storage/aio/operations/_storage_task_assignment_instances_report_operations.py +3 -2
  26. azure/mgmt/storage/aio/operations/_storage_task_assignments_instances_report_operations.py +3 -2
  27. azure/mgmt/storage/aio/operations/_storage_task_assignments_operations.py +16 -6
  28. azure/mgmt/storage/aio/operations/_table_operations.py +7 -4
  29. azure/mgmt/storage/aio/operations/_table_services_operations.py +3 -2
  30. azure/mgmt/storage/aio/operations/_usages_operations.py +3 -2
  31. azure/mgmt/storage/models/__init__.py +22 -0
  32. azure/mgmt/storage/models/_models_py3.py +607 -132
  33. azure/mgmt/storage/models/_storage_management_client_enums.py +21 -1
  34. azure/mgmt/storage/operations/_blob_containers_operations.py +23 -19
  35. azure/mgmt/storage/operations/_blob_inventory_policies_operations.py +7 -6
  36. azure/mgmt/storage/operations/_blob_services_operations.py +6 -5
  37. azure/mgmt/storage/operations/_deleted_accounts_operations.py +5 -4
  38. azure/mgmt/storage/operations/_encryption_scopes_operations.py +7 -6
  39. azure/mgmt/storage/operations/_file_services_operations.py +8 -7
  40. azure/mgmt/storage/operations/_file_shares_operations.py +12 -10
  41. azure/mgmt/storage/operations/_local_users_operations.py +9 -8
  42. azure/mgmt/storage/operations/_management_policies_operations.py +6 -5
  43. azure/mgmt/storage/operations/_network_security_perimeter_configurations_operations.py +6 -5
  44. azure/mgmt/storage/operations/_object_replication_policies_operations.py +7 -6
  45. azure/mgmt/storage/operations/_operations.py +4 -3
  46. azure/mgmt/storage/operations/_private_endpoint_connections_operations.py +7 -6
  47. azure/mgmt/storage/operations/_private_link_resources_operations.py +4 -3
  48. azure/mgmt/storage/operations/_queue_operations.py +8 -7
  49. azure/mgmt/storage/operations/_queue_services_operations.py +6 -5
  50. azure/mgmt/storage/operations/_skus_operations.py +4 -3
  51. azure/mgmt/storage/operations/_storage_accounts_operations.py +21 -20
  52. azure/mgmt/storage/operations/_storage_task_assignment_instances_report_operations.py +5 -4
  53. azure/mgmt/storage/operations/_storage_task_assignments_instances_report_operations.py +4 -3
  54. azure/mgmt/storage/operations/_storage_task_assignments_operations.py +28 -23
  55. azure/mgmt/storage/operations/_table_operations.py +12 -9
  56. azure/mgmt/storage/operations/_table_services_operations.py +6 -5
  57. azure/mgmt/storage/operations/_usages_operations.py +4 -3
  58. {azure_mgmt_storage-23.0.1.dist-info → azure_mgmt_storage-24.0.0.dist-info}/METADATA +54 -11
  59. azure_mgmt_storage-24.0.0.dist-info/RECORD +73 -0
  60. {azure_mgmt_storage-23.0.1.dist-info → azure_mgmt_storage-24.0.0.dist-info}/WHEEL +1 -1
  61. azure_mgmt_storage-23.0.1.dist-info/RECORD +0 -73
  62. {azure_mgmt_storage-23.0.1.dist-info → azure_mgmt_storage-24.0.0.dist-info/licenses}/LICENSE +0 -0
  63. {azure_mgmt_storage-23.0.1.dist-info → azure_mgmt_storage-24.0.0.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,7 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
 
9
- from typing import Any, TYPE_CHECKING
9
+ from typing import Any, Optional, TYPE_CHECKING
10
10
 
11
11
  from azure.core.pipeline import policies
12
12
  from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
@@ -14,6 +14,7 @@ from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLo
14
14
  from ._version import VERSION
15
15
 
16
16
  if TYPE_CHECKING:
17
+ from azure.core import AzureClouds
17
18
  from azure.core.credentials import TokenCredential
18
19
 
19
20
 
@@ -27,13 +28,22 @@ class StorageManagementClientConfiguration: # pylint: disable=too-many-instance
27
28
  :type credential: ~azure.core.credentials.TokenCredential
28
29
  :param subscription_id: The ID of the target subscription. Required.
29
30
  :type subscription_id: str
30
- :keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
31
+ :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
32
+ None.
33
+ :type cloud_setting: ~azure.core.AzureClouds
34
+ :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this
31
35
  default value may result in unsupported behavior.
32
36
  :paramtype api_version: str
33
37
  """
34
38
 
35
- def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36
- api_version: str = kwargs.pop("api_version", "2024-01-01")
39
+ def __init__(
40
+ self,
41
+ credential: "TokenCredential",
42
+ subscription_id: str,
43
+ cloud_setting: Optional["AzureClouds"] = None,
44
+ **kwargs: Any
45
+ ) -> None:
46
+ api_version: str = kwargs.pop("api_version", "2025-06-01")
37
47
 
38
48
  if credential is None:
39
49
  raise ValueError("Parameter 'credential' must not be None.")
@@ -42,6 +52,7 @@ class StorageManagementClientConfiguration: # pylint: disable=too-many-instance
42
52
 
43
53
  self.credential = credential
44
54
  self.subscription_id = subscription_id
55
+ self.cloud_setting = cloud_setting
45
56
  self.api_version = api_version
46
57
  self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
47
58
  kwargs.setdefault("sdk_moniker", "mgmt-storage/{}".format(VERSION))
@@ -48,6 +48,7 @@ from .operations import (
48
48
  )
49
49
 
50
50
  if TYPE_CHECKING:
51
+ from azure.core import AzureClouds
51
52
  from azure.core.credentials import TokenCredential
52
53
 
53
54
 
@@ -117,7 +118,10 @@ class StorageManagementClient: # pylint: disable=too-many-instance-attributes
117
118
  :type subscription_id: str
118
119
  :param base_url: Service URL. Default value is None.
119
120
  :type base_url: str
120
- :keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
121
+ :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
122
+ None.
123
+ :paramtype cloud_setting: ~azure.core.AzureClouds
124
+ :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this
121
125
  default value may result in unsupported behavior.
122
126
  :paramtype api_version: str
123
127
  :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -125,15 +129,25 @@ class StorageManagementClient: # pylint: disable=too-many-instance-attributes
125
129
  """
126
130
 
127
131
  def __init__(
128
- self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
132
+ self,
133
+ credential: "TokenCredential",
134
+ subscription_id: str,
135
+ base_url: Optional[str] = None,
136
+ *,
137
+ cloud_setting: Optional["AzureClouds"] = None,
138
+ **kwargs: Any
129
139
  ) -> None:
130
- _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
140
+ _cloud = cloud_setting or settings.current.azure_cloud # type: ignore
131
141
  _endpoints = get_arm_endpoints(_cloud)
132
142
  if not base_url:
133
143
  base_url = _endpoints["resource_manager"]
134
144
  credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
135
145
  self._config = StorageManagementClientConfiguration(
136
- credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
146
+ credential=credential,
147
+ subscription_id=subscription_id,
148
+ cloud_setting=cloud_setting,
149
+ credential_scopes=credential_scopes,
150
+ **kwargs
137
151
  )
138
152
 
139
153
  _policies = kwargs.pop("policies", None)
@@ -21,7 +21,6 @@ import re
21
21
  import sys
22
22
  import codecs
23
23
  from typing import (
24
- Dict,
25
24
  Any,
26
25
  cast,
27
26
  Optional,
@@ -31,7 +30,6 @@ from typing import (
31
30
  Mapping,
32
31
  Callable,
33
32
  MutableMapping,
34
- List,
35
33
  )
36
34
 
37
35
  try:
@@ -229,12 +227,12 @@ class Model:
229
227
  serialization and deserialization.
230
228
  """
231
229
 
232
- _subtype_map: Dict[str, Dict[str, Any]] = {}
233
- _attribute_map: Dict[str, Dict[str, Any]] = {}
234
- _validation: Dict[str, Dict[str, Any]] = {}
230
+ _subtype_map: dict[str, dict[str, Any]] = {}
231
+ _attribute_map: dict[str, dict[str, Any]] = {}
232
+ _validation: dict[str, dict[str, Any]] = {}
235
233
 
236
234
  def __init__(self, **kwargs: Any) -> None:
237
- self.additional_properties: Optional[Dict[str, Any]] = {}
235
+ self.additional_properties: Optional[dict[str, Any]] = {}
238
236
  for k in kwargs: # pylint: disable=consider-using-dict-items
239
237
  if k not in self._attribute_map:
240
238
  _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
@@ -311,7 +309,7 @@ class Model:
311
309
  def as_dict(
312
310
  self,
313
311
  keep_readonly: bool = True,
314
- key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer,
312
+ key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,
315
313
  **kwargs: Any
316
314
  ) -> JSON:
317
315
  """Return a dict that can be serialized using json.dump.
@@ -380,7 +378,7 @@ class Model:
380
378
  def from_dict(
381
379
  cls,
382
380
  data: Any,
383
- key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
381
+ key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,
384
382
  content_type: Optional[str] = None,
385
383
  ) -> Self:
386
384
  """Parse a dict using given key extractor return a model.
@@ -414,7 +412,7 @@ class Model:
414
412
  return {}
415
413
  result = dict(cls._subtype_map[key])
416
414
  for valuetype in cls._subtype_map[key].values():
417
- result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
415
+ result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access
418
416
  return result
419
417
 
420
418
  @classmethod
@@ -528,7 +526,7 @@ class Serializer: # pylint: disable=too-many-public-methods
528
526
  "[]": self.serialize_iter,
529
527
  "{}": self.serialize_dict,
530
528
  }
531
- self.dependencies: Dict[str, type] = dict(classes) if classes else {}
529
+ self.dependencies: dict[str, type] = dict(classes) if classes else {}
532
530
  self.key_transformer = full_restapi_key_transformer
533
531
  self.client_side_validation = True
534
532
 
@@ -579,7 +577,7 @@ class Serializer: # pylint: disable=too-many-public-methods
579
577
 
580
578
  if attr_name == "additional_properties" and attr_desc["key"] == "":
581
579
  if target_obj.additional_properties is not None:
582
- serialized.update(target_obj.additional_properties)
580
+ serialized |= target_obj.additional_properties
583
581
  continue
584
582
  try:
585
583
 
@@ -789,7 +787,7 @@ class Serializer: # pylint: disable=too-many-public-methods
789
787
 
790
788
  # If dependencies is empty, try with current data class
791
789
  # It has to be a subclass of Enum anyway
792
- enum_type = self.dependencies.get(data_type, data.__class__)
790
+ enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
793
791
  if issubclass(enum_type, Enum):
794
792
  return Serializer.serialize_enum(data, enum_obj=enum_type)
795
793
 
@@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen
1184
1182
 
1185
1183
  while "." in key:
1186
1184
  # Need the cast, as for some reasons "split" is typed as list[str | Any]
1187
- dict_keys = cast(List[str], _FLATTEN.split(key))
1185
+ dict_keys = cast(list[str], _FLATTEN.split(key))
1188
1186
  if len(dict_keys) == 1:
1189
1187
  key = _decode_attribute_map_key(dict_keys[0])
1190
1188
  break
@@ -1386,7 +1384,7 @@ class Deserializer:
1386
1384
  "duration": (isodate.Duration, datetime.timedelta),
1387
1385
  "iso-8601": (datetime.datetime),
1388
1386
  }
1389
- self.dependencies: Dict[str, type] = dict(classes) if classes else {}
1387
+ self.dependencies: dict[str, type] = dict(classes) if classes else {}
1390
1388
  self.key_extractors = [rest_key_extractor, xml_key_extractor]
1391
1389
  # Additional properties only works if the "rest_key_extractor" is used to
1392
1390
  # extract the keys. Making it to work whatever the key extractor is too much
@@ -5,4 +5,4 @@
5
5
  # license information.
6
6
  # --------------------------------------------------------------------------
7
7
 
8
- VERSION = "23.0.1"
8
+ VERSION = "24.0.0"
@@ -6,7 +6,7 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
 
9
- from typing import Any, TYPE_CHECKING
9
+ from typing import Any, Optional, TYPE_CHECKING
10
10
 
11
11
  from azure.core.pipeline import policies
12
12
  from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy
@@ -14,6 +14,7 @@ from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuth
14
14
  from .._version import VERSION
15
15
 
16
16
  if TYPE_CHECKING:
17
+ from azure.core import AzureClouds
17
18
  from azure.core.credentials_async import AsyncTokenCredential
18
19
 
19
20
 
@@ -27,13 +28,22 @@ class StorageManagementClientConfiguration: # pylint: disable=too-many-instance
27
28
  :type credential: ~azure.core.credentials_async.AsyncTokenCredential
28
29
  :param subscription_id: The ID of the target subscription. Required.
29
30
  :type subscription_id: str
30
- :keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
31
+ :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
32
+ None.
33
+ :type cloud_setting: ~azure.core.AzureClouds
34
+ :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this
31
35
  default value may result in unsupported behavior.
32
36
  :paramtype api_version: str
33
37
  """
34
38
 
35
- def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
36
- api_version: str = kwargs.pop("api_version", "2024-01-01")
39
+ def __init__(
40
+ self,
41
+ credential: "AsyncTokenCredential",
42
+ subscription_id: str,
43
+ cloud_setting: Optional["AzureClouds"] = None,
44
+ **kwargs: Any
45
+ ) -> None:
46
+ api_version: str = kwargs.pop("api_version", "2025-06-01")
37
47
 
38
48
  if credential is None:
39
49
  raise ValueError("Parameter 'credential' must not be None.")
@@ -42,6 +52,7 @@ class StorageManagementClientConfiguration: # pylint: disable=too-many-instance
42
52
 
43
53
  self.credential = credential
44
54
  self.subscription_id = subscription_id
55
+ self.cloud_setting = cloud_setting
45
56
  self.api_version = api_version
46
57
  self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
47
58
  kwargs.setdefault("sdk_moniker", "mgmt-storage/{}".format(VERSION))
@@ -48,6 +48,7 @@ from .operations import (
48
48
  )
49
49
 
50
50
  if TYPE_CHECKING:
51
+ from azure.core import AzureClouds
51
52
  from azure.core.credentials_async import AsyncTokenCredential
52
53
 
53
54
 
@@ -119,7 +120,10 @@ class StorageManagementClient: # pylint: disable=too-many-instance-attributes
119
120
  :type subscription_id: str
120
121
  :param base_url: Service URL. Default value is None.
121
122
  :type base_url: str
122
- :keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
123
+ :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
124
+ None.
125
+ :paramtype cloud_setting: ~azure.core.AzureClouds
126
+ :keyword api_version: Api Version. Default value is "2025-06-01". Note that overriding this
123
127
  default value may result in unsupported behavior.
124
128
  :paramtype api_version: str
125
129
  :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -127,15 +131,25 @@ class StorageManagementClient: # pylint: disable=too-many-instance-attributes
127
131
  """
128
132
 
129
133
  def __init__(
130
- self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
134
+ self,
135
+ credential: "AsyncTokenCredential",
136
+ subscription_id: str,
137
+ base_url: Optional[str] = None,
138
+ *,
139
+ cloud_setting: Optional["AzureClouds"] = None,
140
+ **kwargs: Any
131
141
  ) -> None:
132
- _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
142
+ _cloud = cloud_setting or settings.current.azure_cloud # type: ignore
133
143
  _endpoints = get_arm_endpoints(_cloud)
134
144
  if not base_url:
135
145
  base_url = _endpoints["resource_manager"]
136
146
  credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
137
147
  self._config = StorageManagementClientConfiguration(
138
- credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
148
+ credential=credential,
149
+ subscription_id=subscription_id,
150
+ cloud_setting=cloud_setting,
151
+ credential_scopes=credential_scopes,
152
+ **kwargs
139
153
  )
140
154
 
141
155
  _policies = kwargs.pop("policies", None)
@@ -8,7 +8,7 @@
8
8
  # --------------------------------------------------------------------------
9
9
  from collections.abc import MutableMapping
10
10
  from io import IOBase
11
- from typing import Any, AsyncIterator, Callable, Dict, IO, Literal, Optional, TypeVar, Union, cast, overload
11
+ from typing import Any, AsyncIterator, Callable, IO, Literal, Optional, TypeVar, Union, cast, overload
12
12
  import urllib.parse
13
13
 
14
14
  from azure.core import AsyncPipelineClient
@@ -53,7 +53,8 @@ from ...operations._blob_containers_operations import (
53
53
  from .._configuration import StorageManagementClientConfiguration
54
54
 
55
55
  T = TypeVar("T")
56
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
56
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
57
+ List = list
57
58
 
58
59
 
59
60
  class BlobContainersOperations:
@@ -1075,9 +1076,10 @@ class BlobContainersOperations:
1075
1076
  immutability_policy_name: Literal["default"] = kwargs.pop("immutability_policy_name", "default")
1076
1077
  api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
1077
1078
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1079
+ content_type = content_type if parameters else None
1078
1080
  cls: ClsType[_models.ImmutabilityPolicy] = kwargs.pop("cls", None)
1079
1081
 
1080
- content_type = content_type or "application/json"
1082
+ content_type = content_type or "application/json" if parameters else None
1081
1083
  _json = None
1082
1084
  _content = None
1083
1085
  if isinstance(parameters, (IOBase, bytes)):
@@ -1494,9 +1496,10 @@ class BlobContainersOperations:
1494
1496
 
1495
1497
  api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
1496
1498
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1499
+ content_type = content_type if parameters else None
1497
1500
  cls: ClsType[_models.ImmutabilityPolicy] = kwargs.pop("cls", None)
1498
1501
 
1499
- content_type = content_type or "application/json"
1502
+ content_type = content_type or "application/json" if parameters else None
1500
1503
  _json = None
1501
1504
  _content = None
1502
1505
  if isinstance(parameters, (IOBase, bytes)):
@@ -1659,9 +1662,10 @@ class BlobContainersOperations:
1659
1662
 
1660
1663
  api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
1661
1664
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
1665
+ content_type = content_type if parameters else None
1662
1666
  cls: ClsType[_models.LeaseContainerResponse] = kwargs.pop("cls", None)
1663
1667
 
1664
- content_type = content_type or "application/json"
1668
+ content_type = content_type or "application/json" if parameters else None
1665
1669
  _json = None
1666
1670
  _content = None
1667
1671
  if isinstance(parameters, (IOBase, bytes)):
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -38,7 +38,8 @@ from ...operations._blob_inventory_policies_operations import (
38
38
  from .._configuration import StorageManagementClientConfiguration
39
39
 
40
40
  T = TypeVar("T")
41
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
41
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
42
+ List = list
42
43
 
43
44
 
44
45
  class BlobInventoryPoliciesOperations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Literal, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -37,7 +37,8 @@ from ...operations._blob_services_operations import (
37
37
  from .._configuration import StorageManagementClientConfiguration
38
38
 
39
39
  T = TypeVar("T")
40
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
40
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
41
+ List = list
41
42
 
42
43
 
43
44
  class BlobServicesOperations:
@@ -6,7 +6,7 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
- from typing import Any, Callable, Dict, Optional, TypeVar
9
+ from typing import Any, Callable, Optional, TypeVar
10
10
  import urllib.parse
11
11
 
12
12
  from azure.core import AsyncPipelineClient
@@ -32,7 +32,8 @@ from ...operations._deleted_accounts_operations import build_get_request, build_
32
32
  from .._configuration import StorageManagementClientConfiguration
33
33
 
34
34
  T = TypeVar("T")
35
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
35
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
36
+ List = list
36
37
 
37
38
 
38
39
  class DeletedAccountsOperations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -38,7 +38,8 @@ from ...operations._encryption_scopes_operations import (
38
38
  from .._configuration import StorageManagementClientConfiguration
39
39
 
40
40
  T = TypeVar("T")
41
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
41
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
42
+ List = list
42
43
 
43
44
 
44
45
  class EncryptionScopesOperations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Literal, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -39,7 +39,8 @@ from ...operations._file_services_operations import (
39
39
  from .._configuration import StorageManagementClientConfiguration
40
40
 
41
41
  T = TypeVar("T")
42
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
42
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
43
+ List = list
43
44
 
44
45
 
45
46
  class FileServicesOperations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -41,7 +41,8 @@ from ...operations._file_shares_operations import (
41
41
  from .._configuration import StorageManagementClientConfiguration
42
42
 
43
43
  T = TypeVar("T")
44
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
44
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
45
+ List = list
45
46
 
46
47
 
47
48
  class FileSharesOperations:
@@ -935,9 +936,10 @@ class FileSharesOperations:
935
936
 
936
937
  api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
937
938
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
939
+ content_type = content_type if parameters else None
938
940
  cls: ClsType[_models.LeaseShareResponse] = kwargs.pop("cls", None)
939
941
 
940
- content_type = content_type or "application/json"
942
+ content_type = content_type or "application/json" if parameters else None
941
943
  _json = None
942
944
  _content = None
943
945
  if isinstance(parameters, (IOBase, bytes)):
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -40,7 +40,8 @@ from ...operations._local_users_operations import (
40
40
  from .._configuration import StorageManagementClientConfiguration
41
41
 
42
42
  T = TypeVar("T")
43
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
43
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
44
+ List = list
44
45
 
45
46
 
46
47
  class LocalUsersOperations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
 
12
12
  from azure.core import AsyncPipelineClient
13
13
  from azure.core.exceptions import (
@@ -34,7 +34,8 @@ from ...operations._management_policies_operations import (
34
34
  from .._configuration import StorageManagementClientConfiguration
35
35
 
36
36
  T = TypeVar("T")
37
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
37
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
38
+ List = list
38
39
 
39
40
 
40
41
  class ManagementPoliciesOperations:
@@ -6,7 +6,7 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
- from typing import Any, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast
9
+ from typing import Any, AsyncIterator, Callable, Optional, TypeVar, Union, cast
10
10
  import urllib.parse
11
11
 
12
12
  from azure.core import AsyncPipelineClient
@@ -40,7 +40,8 @@ from ...operations._network_security_perimeter_configurations_operations import
40
40
  from .._configuration import StorageManagementClientConfiguration
41
41
 
42
42
  T = TypeVar("T")
43
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
43
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
44
+ List = list
44
45
 
45
46
 
46
47
  class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name-too-long
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -38,7 +38,8 @@ from ...operations._object_replication_policies_operations import (
38
38
  from .._configuration import StorageManagementClientConfiguration
39
39
 
40
40
  T = TypeVar("T")
41
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
41
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
42
+ List = list
42
43
 
43
44
 
44
45
  class ObjectReplicationPoliciesOperations:
@@ -6,7 +6,7 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
- from typing import Any, Callable, Dict, Optional, TypeVar
9
+ from typing import Any, Callable, Optional, TypeVar
10
10
  import urllib.parse
11
11
 
12
12
  from azure.core import AsyncPipelineClient
@@ -31,7 +31,8 @@ from ...operations._operations import build_list_request
31
31
  from .._configuration import StorageManagementClientConfiguration
32
32
 
33
33
  T = TypeVar("T")
34
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
34
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
35
+ List = list
35
36
 
36
37
 
37
38
  class Operations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -38,7 +38,8 @@ from ...operations._private_endpoint_connections_operations import (
38
38
  from .._configuration import StorageManagementClientConfiguration
39
39
 
40
40
  T = TypeVar("T")
41
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
41
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
42
+ List = list
42
43
 
43
44
 
44
45
  class PrivateEndpointConnectionsOperations:
@@ -6,7 +6,7 @@
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
- from typing import Any, Callable, Dict, Optional, TypeVar
9
+ from typing import Any, Callable, Optional, TypeVar
10
10
 
11
11
  from azure.core import AsyncPipelineClient
12
12
  from azure.core.exceptions import (
@@ -29,7 +29,8 @@ from ...operations._private_link_resources_operations import build_list_by_stora
29
29
  from .._configuration import StorageManagementClientConfiguration
30
30
 
31
31
  T = TypeVar("T")
32
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
32
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
33
+ List = list
33
34
 
34
35
 
35
36
  class PrivateLinkResourcesOperations:
@@ -7,7 +7,7 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from collections.abc import MutableMapping
9
9
  from io import IOBase
10
- from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
13
  from azure.core import AsyncPipelineClient
@@ -39,7 +39,8 @@ from ...operations._queue_operations import (
39
39
  from .._configuration import StorageManagementClientConfiguration
40
40
 
41
41
  T = TypeVar("T")
42
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
42
+ ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]]
43
+ List = list
43
44
 
44
45
 
45
46
  class QueueOperations: