azure-mgmt-storage 22.2.0__py3-none-any.whl → 23.0.1__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 (184) hide show
  1. azure/mgmt/storage/__init__.py +19 -7
  2. azure/mgmt/storage/_configuration.py +27 -29
  3. azure/mgmt/storage/{v2016_01_01/models/_patch.py → _patch.py} +5 -4
  4. azure/mgmt/storage/_storage_management_client.py +184 -499
  5. azure/mgmt/storage/{v2016_01_01/_version.py → _utils/__init__.py} +0 -3
  6. azure/mgmt/storage/{_serialization.py → _utils/serialization.py} +46 -131
  7. azure/mgmt/storage/_version.py +1 -1
  8. azure/mgmt/storage/aio/__init__.py +21 -2
  9. azure/mgmt/storage/aio/_configuration.py +27 -29
  10. azure/mgmt/storage/{v2017_10_01/aio/operations → aio}/_patch.py +5 -4
  11. azure/mgmt/storage/aio/_storage_management_client.py +188 -497
  12. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/__init__.py +1 -0
  13. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_containers_operations.py +68 -84
  14. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_inventory_policies_operations.py +28 -36
  15. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_services_operations.py +22 -24
  16. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_deleted_accounts_operations.py +16 -19
  17. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_encryption_scopes_operations.py +29 -32
  18. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_services_operations.py +26 -29
  19. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_shares_operations.py +38 -41
  20. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_local_users_operations.py +28 -31
  21. azure/mgmt/storage/{v2019_06_01/aio → aio}/operations/_management_policies_operations.py +23 -30
  22. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_network_security_perimeter_configurations_operations.py +18 -21
  23. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_object_replication_policies_operations.py +23 -25
  24. azure/mgmt/storage/{v2017_10_01/aio → aio}/operations/_operations.py +14 -17
  25. azure/mgmt/storage/{v2016_01_01/aio → aio}/operations/_patch.py +5 -4
  26. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_private_endpoint_connections_operations.py +23 -25
  27. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_private_link_resources_operations.py +11 -13
  28. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_queue_operations.py +29 -32
  29. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_queue_services_operations.py +19 -21
  30. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_skus_operations.py +14 -17
  31. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_accounts_operations.py +83 -111
  32. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignment_instances_report_operations.py +15 -17
  33. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_instances_report_operations.py +15 -17
  34. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_operations.py +38 -44
  35. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_operations.py +29 -31
  36. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_services_operations.py +19 -21
  37. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_usages_operations.py +14 -16
  38. azure/mgmt/storage/{v2024_01_01/models → models}/_models_py3.py +857 -912
  39. azure/mgmt/storage/{v2016_01_01/operations → models}/_patch.py +5 -4
  40. azure/mgmt/storage/{v2024_01_01/operations → operations}/__init__.py +1 -0
  41. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_containers_operations.py +84 -87
  42. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_inventory_policies_operations.py +34 -42
  43. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_services_operations.py +27 -30
  44. azure/mgmt/storage/{v2024_01_01/operations → operations}/_deleted_accounts_operations.py +19 -21
  45. azure/mgmt/storage/{v2024_01_01/operations → operations}/_encryption_scopes_operations.py +35 -37
  46. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_services_operations.py +33 -35
  47. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_shares_operations.py +47 -50
  48. azure/mgmt/storage/{v2024_01_01/operations → operations}/_local_users_operations.py +36 -38
  49. azure/mgmt/storage/{v2024_01_01/operations → operations}/_management_policies_operations.py +28 -35
  50. azure/mgmt/storage/{v2024_01_01/operations → operations}/_network_security_perimeter_configurations_operations.py +23 -25
  51. azure/mgmt/storage/{v2024_01_01/operations → operations}/_object_replication_policies_operations.py +29 -32
  52. azure/mgmt/storage/{v2024_01_01/operations → operations}/_operations.py +15 -18
  53. azure/mgmt/storage/operations/_patch.py +21 -0
  54. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_endpoint_connections_operations.py +29 -32
  55. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_link_resources_operations.py +14 -16
  56. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_operations.py +36 -38
  57. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_services_operations.py +24 -26
  58. azure/mgmt/storage/{v2024_01_01/operations → operations}/_skus_operations.py +15 -18
  59. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_accounts_operations.py +101 -109
  60. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignment_instances_report_operations.py +17 -21
  61. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_instances_report_operations.py +17 -21
  62. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_operations.py +42 -53
  63. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_operations.py +36 -38
  64. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_services_operations.py +24 -26
  65. azure/mgmt/storage/{v2024_01_01/operations → operations}/_usages_operations.py +16 -19
  66. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.1.dist-info}/METADATA +17 -6
  67. azure_mgmt_storage-23.0.1.dist-info/RECORD +73 -0
  68. azure/mgmt/storage/models.py +0 -8
  69. azure/mgmt/storage/v2016_01_01/__init__.py +0 -32
  70. azure/mgmt/storage/v2016_01_01/_configuration.py +0 -65
  71. azure/mgmt/storage/v2016_01_01/_patch.py +0 -32
  72. azure/mgmt/storage/v2016_01_01/_storage_management_client.py +0 -117
  73. azure/mgmt/storage/v2016_01_01/aio/__init__.py +0 -29
  74. azure/mgmt/storage/v2016_01_01/aio/_configuration.py +0 -65
  75. azure/mgmt/storage/v2016_01_01/aio/_patch.py +0 -32
  76. azure/mgmt/storage/v2016_01_01/aio/_storage_management_client.py +0 -120
  77. azure/mgmt/storage/v2016_01_01/aio/operations/__init__.py +0 -27
  78. azure/mgmt/storage/v2016_01_01/aio/operations/_storage_accounts_operations.py +0 -1023
  79. azure/mgmt/storage/v2016_01_01/aio/operations/_usage_operations.py +0 -130
  80. azure/mgmt/storage/v2016_01_01/models/__init__.py +0 -88
  81. azure/mgmt/storage/v2016_01_01/models/_models_py3.py +0 -829
  82. azure/mgmt/storage/v2016_01_01/models/_storage_management_client_enums.py +0 -99
  83. azure/mgmt/storage/v2016_01_01/operations/__init__.py +0 -27
  84. azure/mgmt/storage/v2016_01_01/operations/_storage_accounts_operations.py +0 -1278
  85. azure/mgmt/storage/v2016_01_01/operations/_usage_operations.py +0 -157
  86. azure/mgmt/storage/v2016_01_01/py.typed +0 -1
  87. azure/mgmt/storage/v2017_10_01/__init__.py +0 -32
  88. azure/mgmt/storage/v2017_10_01/_configuration.py +0 -65
  89. azure/mgmt/storage/v2017_10_01/_patch.py +0 -32
  90. azure/mgmt/storage/v2017_10_01/_storage_management.py +0 -121
  91. azure/mgmt/storage/v2017_10_01/_version.py +0 -9
  92. azure/mgmt/storage/v2017_10_01/aio/__init__.py +0 -29
  93. azure/mgmt/storage/v2017_10_01/aio/_configuration.py +0 -65
  94. azure/mgmt/storage/v2017_10_01/aio/_patch.py +0 -32
  95. azure/mgmt/storage/v2017_10_01/aio/_storage_management.py +0 -124
  96. azure/mgmt/storage/v2017_10_01/aio/operations/__init__.py +0 -31
  97. azure/mgmt/storage/v2017_10_01/aio/operations/_skus_operations.py +0 -130
  98. azure/mgmt/storage/v2017_10_01/aio/operations/_storage_accounts_operations.py +0 -1299
  99. azure/mgmt/storage/v2017_10_01/aio/operations/_usage_operations.py +0 -130
  100. azure/mgmt/storage/v2017_10_01/models/__init__.py +0 -140
  101. azure/mgmt/storage/v2017_10_01/models/_models_py3.py +0 -1851
  102. azure/mgmt/storage/v2017_10_01/models/_patch.py +0 -20
  103. azure/mgmt/storage/v2017_10_01/models/_storage_management_enums.py +0 -192
  104. azure/mgmt/storage/v2017_10_01/operations/__init__.py +0 -31
  105. azure/mgmt/storage/v2017_10_01/operations/_operations.py +0 -151
  106. azure/mgmt/storage/v2017_10_01/operations/_patch.py +0 -20
  107. azure/mgmt/storage/v2017_10_01/operations/_skus_operations.py +0 -157
  108. azure/mgmt/storage/v2017_10_01/operations/_storage_accounts_operations.py +0 -1638
  109. azure/mgmt/storage/v2017_10_01/operations/_usage_operations.py +0 -157
  110. azure/mgmt/storage/v2017_10_01/py.typed +0 -1
  111. azure/mgmt/storage/v2019_06_01/__init__.py +0 -32
  112. azure/mgmt/storage/v2019_06_01/_configuration.py +0 -64
  113. azure/mgmt/storage/v2019_06_01/_patch.py +0 -32
  114. azure/mgmt/storage/v2019_06_01/_storage_management_client.py +0 -213
  115. azure/mgmt/storage/v2019_06_01/_version.py +0 -9
  116. azure/mgmt/storage/v2019_06_01/aio/__init__.py +0 -29
  117. azure/mgmt/storage/v2019_06_01/aio/_configuration.py +0 -64
  118. azure/mgmt/storage/v2019_06_01/aio/_patch.py +0 -32
  119. azure/mgmt/storage/v2019_06_01/aio/_storage_management_client.py +0 -217
  120. azure/mgmt/storage/v2019_06_01/aio/operations/__init__.py +0 -59
  121. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_containers_operations.py +0 -1725
  122. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_inventory_policies_operations.py +0 -437
  123. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_services_operations.py +0 -368
  124. azure/mgmt/storage/v2019_06_01/aio/operations/_encryption_scopes_operations.py +0 -538
  125. azure/mgmt/storage/v2019_06_01/aio/operations/_file_services_operations.py +0 -335
  126. azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py +0 -771
  127. azure/mgmt/storage/v2019_06_01/aio/operations/_object_replication_policies_operations.py +0 -428
  128. azure/mgmt/storage/v2019_06_01/aio/operations/_operations.py +0 -130
  129. azure/mgmt/storage/v2019_06_01/aio/operations/_patch.py +0 -20
  130. azure/mgmt/storage/v2019_06_01/aio/operations/_private_endpoint_connections_operations.py +0 -424
  131. azure/mgmt/storage/v2019_06_01/aio/operations/_private_link_resources_operations.py +0 -113
  132. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_operations.py +0 -597
  133. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_services_operations.py +0 -335
  134. azure/mgmt/storage/v2019_06_01/aio/operations/_skus_operations.py +0 -131
  135. azure/mgmt/storage/v2019_06_01/aio/operations/_storage_accounts_operations.py +0 -1696
  136. azure/mgmt/storage/v2019_06_01/aio/operations/_table_operations.py +0 -394
  137. azure/mgmt/storage/v2019_06_01/aio/operations/_table_services_operations.py +0 -335
  138. azure/mgmt/storage/v2019_06_01/aio/operations/_usages_operations.py +0 -134
  139. azure/mgmt/storage/v2019_06_01/models/__init__.py +0 -364
  140. azure/mgmt/storage/v2019_06_01/models/_models_py3.py +0 -6038
  141. azure/mgmt/storage/v2019_06_01/models/_patch.py +0 -20
  142. azure/mgmt/storage/v2019_06_01/models/_storage_management_client_enums.py +0 -456
  143. azure/mgmt/storage/v2019_06_01/operations/__init__.py +0 -59
  144. azure/mgmt/storage/v2019_06_01/operations/_blob_containers_operations.py +0 -2226
  145. azure/mgmt/storage/v2019_06_01/operations/_blob_inventory_policies_operations.py +0 -582
  146. azure/mgmt/storage/v2019_06_01/operations/_blob_services_operations.py +0 -476
  147. azure/mgmt/storage/v2019_06_01/operations/_encryption_scopes_operations.py +0 -677
  148. azure/mgmt/storage/v2019_06_01/operations/_file_services_operations.py +0 -444
  149. azure/mgmt/storage/v2019_06_01/operations/_file_shares_operations.py +0 -1000
  150. azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py +0 -453
  151. azure/mgmt/storage/v2019_06_01/operations/_object_replication_policies_operations.py +0 -567
  152. azure/mgmt/storage/v2019_06_01/operations/_operations.py +0 -151
  153. azure/mgmt/storage/v2019_06_01/operations/_patch.py +0 -20
  154. azure/mgmt/storage/v2019_06_01/operations/_private_endpoint_connections_operations.py +0 -575
  155. azure/mgmt/storage/v2019_06_01/operations/_private_link_resources_operations.py +0 -149
  156. azure/mgmt/storage/v2019_06_01/operations/_queue_operations.py +0 -805
  157. azure/mgmt/storage/v2019_06_01/operations/_queue_services_operations.py +0 -444
  158. azure/mgmt/storage/v2019_06_01/operations/_skus_operations.py +0 -157
  159. azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py +0 -2122
  160. azure/mgmt/storage/v2019_06_01/operations/_table_operations.py +0 -563
  161. azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py +0 -444
  162. azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py +0 -164
  163. azure/mgmt/storage/v2019_06_01/py.typed +0 -1
  164. azure/mgmt/storage/v2024_01_01/__init__.py +0 -32
  165. azure/mgmt/storage/v2024_01_01/_configuration.py +0 -64
  166. azure/mgmt/storage/v2024_01_01/_patch.py +0 -20
  167. azure/mgmt/storage/v2024_01_01/_storage_management_client.py +0 -256
  168. azure/mgmt/storage/v2024_01_01/_version.py +0 -9
  169. azure/mgmt/storage/v2024_01_01/aio/__init__.py +0 -29
  170. azure/mgmt/storage/v2024_01_01/aio/_configuration.py +0 -64
  171. azure/mgmt/storage/v2024_01_01/aio/_patch.py +0 -20
  172. azure/mgmt/storage/v2024_01_01/aio/_storage_management_client.py +0 -261
  173. azure/mgmt/storage/v2024_01_01/aio/operations/_management_policies_operations.py +0 -343
  174. azure/mgmt/storage/v2024_01_01/aio/operations/_operations.py +0 -130
  175. azure/mgmt/storage/v2024_01_01/aio/operations/_patch.py +0 -20
  176. azure/mgmt/storage/v2024_01_01/models/_patch.py +0 -20
  177. azure/mgmt/storage/v2024_01_01/operations/_patch.py +0 -20
  178. azure/mgmt/storage/v2024_01_01/py.typed +0 -1
  179. azure_mgmt_storage-22.2.0.dist-info/RECORD +0 -183
  180. /azure/mgmt/storage/{v2024_01_01/models → models}/__init__.py +0 -0
  181. /azure/mgmt/storage/{v2024_01_01/models → models}/_storage_management_client_enums.py +0 -0
  182. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.1.dist-info}/LICENSE +0 -0
  183. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.1.dist-info}/WHEEL +0 -0
  184. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.1.dist-info}/top_level.txt +0 -0
@@ -5,11 +5,12 @@
5
5
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
+ from collections.abc import MutableMapping
8
9
  from io import IOBase
9
- import sys
10
- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
10
+ from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
11
11
  import urllib.parse
12
12
 
13
+ from azure.core import AsyncPipelineClient
13
14
  from azure.core.async_paging import AsyncItemPaged, AsyncList
14
15
  from azure.core.exceptions import (
15
16
  ClientAuthenticationError,
@@ -27,6 +28,7 @@ from azure.core.utils import case_insensitive_dict
27
28
  from azure.mgmt.core.exceptions import ARMErrorFormat
28
29
 
29
30
  from ... import models as _models
31
+ from ..._utils.serialization import Deserializer, Serializer
30
32
  from ...operations._table_operations import (
31
33
  build_create_request,
32
34
  build_delete_request,
@@ -34,11 +36,8 @@ from ...operations._table_operations import (
34
36
  build_list_request,
35
37
  build_update_request,
36
38
  )
39
+ from .._configuration import StorageManagementClientConfiguration
37
40
 
38
- if sys.version_info >= (3, 9):
39
- from collections.abc import MutableMapping
40
- else:
41
- from typing import MutableMapping # type: ignore
42
41
  T = TypeVar("T")
43
42
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
44
43
 
@@ -49,7 +48,7 @@ class TableOperations:
49
48
  **DO NOT** instantiate this class directly.
50
49
 
51
50
  Instead, you should access the following operations through
52
- :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
51
+ :class:`~azure.mgmt.storage.aio.StorageManagementClient`'s
53
52
  :attr:`table` attribute.
54
53
  """
55
54
 
@@ -57,11 +56,10 @@ class TableOperations:
57
56
 
58
57
  def __init__(self, *args, **kwargs) -> None:
59
58
  input_args = list(args)
60
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
61
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
62
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
63
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
64
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
59
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
60
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
61
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
62
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
65
63
 
66
64
  @overload
67
65
  async def create(
@@ -88,12 +86,12 @@ class TableOperations:
88
86
  with a numeric character. Required.
89
87
  :type table_name: str
90
88
  :param parameters: The parameters to provide to create a table. Default value is None.
91
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.Table
89
+ :type parameters: ~azure.mgmt.storage.models.Table
92
90
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
93
91
  Default value is "application/json".
94
92
  :paramtype content_type: str
95
93
  :return: Table or the result of cls(response)
96
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
94
+ :rtype: ~azure.mgmt.storage.models.Table
97
95
  :raises ~azure.core.exceptions.HttpResponseError:
98
96
  """
99
97
 
@@ -127,7 +125,7 @@ class TableOperations:
127
125
  Default value is "application/json".
128
126
  :paramtype content_type: str
129
127
  :return: Table or the result of cls(response)
130
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
128
+ :rtype: ~azure.mgmt.storage.models.Table
131
129
  :raises ~azure.core.exceptions.HttpResponseError:
132
130
  """
133
131
 
@@ -155,9 +153,9 @@ class TableOperations:
155
153
  :type table_name: str
156
154
  :param parameters: The parameters to provide to create a table. Is either a Table type or a
157
155
  IO[bytes] type. Default value is None.
158
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.Table or IO[bytes]
156
+ :type parameters: ~azure.mgmt.storage.models.Table or IO[bytes]
159
157
  :return: Table or the result of cls(response)
160
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
158
+ :rtype: ~azure.mgmt.storage.models.Table
161
159
  :raises ~azure.core.exceptions.HttpResponseError:
162
160
  """
163
161
  error_map: MutableMapping = {
@@ -171,7 +169,7 @@ class TableOperations:
171
169
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
172
170
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
173
171
 
174
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
172
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
175
173
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
176
174
  cls: ClsType[_models.Table] = kwargs.pop("cls", None)
177
175
 
@@ -243,12 +241,12 @@ class TableOperations:
243
241
  with a numeric character. Required.
244
242
  :type table_name: str
245
243
  :param parameters: The parameters to provide to create a table. Default value is None.
246
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.Table
244
+ :type parameters: ~azure.mgmt.storage.models.Table
247
245
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
248
246
  Default value is "application/json".
249
247
  :paramtype content_type: str
250
248
  :return: Table or the result of cls(response)
251
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
249
+ :rtype: ~azure.mgmt.storage.models.Table
252
250
  :raises ~azure.core.exceptions.HttpResponseError:
253
251
  """
254
252
 
@@ -282,7 +280,7 @@ class TableOperations:
282
280
  Default value is "application/json".
283
281
  :paramtype content_type: str
284
282
  :return: Table or the result of cls(response)
285
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
283
+ :rtype: ~azure.mgmt.storage.models.Table
286
284
  :raises ~azure.core.exceptions.HttpResponseError:
287
285
  """
288
286
 
@@ -310,9 +308,9 @@ class TableOperations:
310
308
  :type table_name: str
311
309
  :param parameters: The parameters to provide to create a table. Is either a Table type or a
312
310
  IO[bytes] type. Default value is None.
313
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.Table or IO[bytes]
311
+ :type parameters: ~azure.mgmt.storage.models.Table or IO[bytes]
314
312
  :return: Table or the result of cls(response)
315
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
313
+ :rtype: ~azure.mgmt.storage.models.Table
316
314
  :raises ~azure.core.exceptions.HttpResponseError:
317
315
  """
318
316
  error_map: MutableMapping = {
@@ -326,7 +324,7 @@ class TableOperations:
326
324
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
327
325
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
328
326
 
329
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
327
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
330
328
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
331
329
  cls: ClsType[_models.Table] = kwargs.pop("cls", None)
332
330
 
@@ -389,7 +387,7 @@ class TableOperations:
389
387
  with a numeric character. Required.
390
388
  :type table_name: str
391
389
  :return: Table or the result of cls(response)
392
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.Table
390
+ :rtype: ~azure.mgmt.storage.models.Table
393
391
  :raises ~azure.core.exceptions.HttpResponseError:
394
392
  """
395
393
  error_map: MutableMapping = {
@@ -403,7 +401,7 @@ class TableOperations:
403
401
  _headers = kwargs.pop("headers", {}) or {}
404
402
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
405
403
 
406
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
404
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
407
405
  cls: ClsType[_models.Table] = kwargs.pop("cls", None)
408
406
 
409
407
  _request = build_get_request(
@@ -465,7 +463,7 @@ class TableOperations:
465
463
  _headers = kwargs.pop("headers", {}) or {}
466
464
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
467
465
 
468
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
466
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
469
467
  cls: ClsType[None] = kwargs.pop("cls", None)
470
468
 
471
469
  _request = build_delete_request(
@@ -494,7 +492,7 @@ class TableOperations:
494
492
  return cls(pipeline_response, None, {}) # type: ignore
495
493
 
496
494
  @distributed_trace
497
- def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterable["_models.Table"]:
495
+ def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Table"]:
498
496
  """Gets a list of all the tables under the specified storage account.
499
497
 
500
498
  :param resource_group_name: The name of the resource group within the user's subscription. The
@@ -505,13 +503,13 @@ class TableOperations:
505
503
  lower-case letters only. Required.
506
504
  :type account_name: str
507
505
  :return: An iterator like instance of either Table or the result of cls(response)
508
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.Table]
506
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.models.Table]
509
507
  :raises ~azure.core.exceptions.HttpResponseError:
510
508
  """
511
509
  _headers = kwargs.pop("headers", {}) or {}
512
510
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
513
511
 
514
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
512
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
515
513
  cls: ClsType[_models.ListTableResource] = kwargs.pop("cls", None)
516
514
 
517
515
  error_map: MutableMapping = {
@@ -544,7 +542,7 @@ class TableOperations:
544
542
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
545
543
  }
546
544
  )
547
- _next_request_params["api-version"] = self._api_version
545
+ _next_request_params["api-version"] = self._config.api_version
548
546
  _request = HttpRequest(
549
547
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
550
548
  )
@@ -5,10 +5,11 @@
5
5
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
+ from collections.abc import MutableMapping
8
9
  from io import IOBase
9
- import sys
10
10
  from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
11
11
 
12
+ from azure.core import AsyncPipelineClient
12
13
  from azure.core.exceptions import (
13
14
  ClientAuthenticationError,
14
15
  HttpResponseError,
@@ -24,16 +25,14 @@ from azure.core.utils import case_insensitive_dict
24
25
  from azure.mgmt.core.exceptions import ARMErrorFormat
25
26
 
26
27
  from ... import models as _models
28
+ from ..._utils.serialization import Deserializer, Serializer
27
29
  from ...operations._table_services_operations import (
28
30
  build_get_service_properties_request,
29
31
  build_list_request,
30
32
  build_set_service_properties_request,
31
33
  )
34
+ from .._configuration import StorageManagementClientConfiguration
32
35
 
33
- if sys.version_info >= (3, 9):
34
- from collections.abc import MutableMapping
35
- else:
36
- from typing import MutableMapping # type: ignore
37
36
  T = TypeVar("T")
38
37
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
39
38
 
@@ -44,7 +43,7 @@ class TableServicesOperations:
44
43
  **DO NOT** instantiate this class directly.
45
44
 
46
45
  Instead, you should access the following operations through
47
- :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
46
+ :class:`~azure.mgmt.storage.aio.StorageManagementClient`'s
48
47
  :attr:`table_services` attribute.
49
48
  """
50
49
 
@@ -52,11 +51,10 @@ class TableServicesOperations:
52
51
 
53
52
  def __init__(self, *args, **kwargs) -> None:
54
53
  input_args = list(args)
55
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
56
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
57
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
58
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
59
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
54
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
55
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
56
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
57
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
60
58
 
61
59
  @distributed_trace_async
62
60
  async def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> _models.ListTableServices:
@@ -70,7 +68,7 @@ class TableServicesOperations:
70
68
  lower-case letters only. Required.
71
69
  :type account_name: str
72
70
  :return: ListTableServices or the result of cls(response)
73
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.ListTableServices
71
+ :rtype: ~azure.mgmt.storage.models.ListTableServices
74
72
  :raises ~azure.core.exceptions.HttpResponseError:
75
73
  """
76
74
  error_map: MutableMapping = {
@@ -84,7 +82,7 @@ class TableServicesOperations:
84
82
  _headers = kwargs.pop("headers", {}) or {}
85
83
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
86
84
 
87
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
85
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
88
86
  cls: ClsType[_models.ListTableServices] = kwargs.pop("cls", None)
89
87
 
90
88
  _request = build_list_request(
@@ -137,12 +135,12 @@ class TableServicesOperations:
137
135
  :type account_name: str
138
136
  :param parameters: The properties of a storage account’s Table service, only properties for
139
137
  Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified. Required.
140
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.TableServiceProperties
138
+ :type parameters: ~azure.mgmt.storage.models.TableServiceProperties
141
139
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
142
140
  Default value is "application/json".
143
141
  :paramtype content_type: str
144
142
  :return: TableServiceProperties or the result of cls(response)
145
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.TableServiceProperties
143
+ :rtype: ~azure.mgmt.storage.models.TableServiceProperties
146
144
  :raises ~azure.core.exceptions.HttpResponseError:
147
145
  """
148
146
 
@@ -173,7 +171,7 @@ class TableServicesOperations:
173
171
  Default value is "application/json".
174
172
  :paramtype content_type: str
175
173
  :return: TableServiceProperties or the result of cls(response)
176
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.TableServiceProperties
174
+ :rtype: ~azure.mgmt.storage.models.TableServiceProperties
177
175
  :raises ~azure.core.exceptions.HttpResponseError:
178
176
  """
179
177
 
@@ -198,9 +196,9 @@ class TableServicesOperations:
198
196
  :param parameters: The properties of a storage account’s Table service, only properties for
199
197
  Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified. Is either a
200
198
  TableServiceProperties type or a IO[bytes] type. Required.
201
- :type parameters: ~azure.mgmt.storage.v2024_01_01.models.TableServiceProperties or IO[bytes]
199
+ :type parameters: ~azure.mgmt.storage.models.TableServiceProperties or IO[bytes]
202
200
  :return: TableServiceProperties or the result of cls(response)
203
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.TableServiceProperties
201
+ :rtype: ~azure.mgmt.storage.models.TableServiceProperties
204
202
  :raises ~azure.core.exceptions.HttpResponseError:
205
203
  """
206
204
  error_map: MutableMapping = {
@@ -214,7 +212,7 @@ class TableServicesOperations:
214
212
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
215
213
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
216
214
 
217
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
215
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
218
216
  table_service_name: Literal["default"] = kwargs.pop("table_service_name", "default")
219
217
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
220
218
  cls: ClsType[_models.TableServiceProperties] = kwargs.pop("cls", None)
@@ -274,7 +272,7 @@ class TableServicesOperations:
274
272
  lower-case letters only. Required.
275
273
  :type account_name: str
276
274
  :return: TableServiceProperties or the result of cls(response)
277
- :rtype: ~azure.mgmt.storage.v2024_01_01.models.TableServiceProperties
275
+ :rtype: ~azure.mgmt.storage.models.TableServiceProperties
278
276
  :raises ~azure.core.exceptions.HttpResponseError:
279
277
  """
280
278
  error_map: MutableMapping = {
@@ -288,7 +286,7 @@ class TableServicesOperations:
288
286
  _headers = kwargs.pop("headers", {}) or {}
289
287
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
290
288
 
291
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
289
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
292
290
  table_service_name: Literal["default"] = kwargs.pop("table_service_name", "default")
293
291
  cls: ClsType[_models.TableServiceProperties] = kwargs.pop("cls", None)
294
292
 
@@ -5,10 +5,11 @@
5
5
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
- import sys
9
- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
8
+ from collections.abc import MutableMapping
9
+ from typing import Any, Callable, Dict, Optional, TypeVar
10
10
  import urllib.parse
11
11
 
12
+ from azure.core import AsyncPipelineClient
12
13
  from azure.core.async_paging import AsyncItemPaged, AsyncList
13
14
  from azure.core.exceptions import (
14
15
  ClientAuthenticationError,
@@ -25,12 +26,10 @@ from azure.core.utils import case_insensitive_dict
25
26
  from azure.mgmt.core.exceptions import ARMErrorFormat
26
27
 
27
28
  from ... import models as _models
29
+ from ..._utils.serialization import Deserializer, Serializer
28
30
  from ...operations._usages_operations import build_list_by_location_request
31
+ from .._configuration import StorageManagementClientConfiguration
29
32
 
30
- if sys.version_info >= (3, 9):
31
- from collections.abc import MutableMapping
32
- else:
33
- from typing import MutableMapping # type: ignore
34
33
  T = TypeVar("T")
35
34
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
36
35
 
@@ -41,7 +40,7 @@ class UsagesOperations:
41
40
  **DO NOT** instantiate this class directly.
42
41
 
43
42
  Instead, you should access the following operations through
44
- :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
43
+ :class:`~azure.mgmt.storage.aio.StorageManagementClient`'s
45
44
  :attr:`usages` attribute.
46
45
  """
47
46
 
@@ -49,27 +48,26 @@ class UsagesOperations:
49
48
 
50
49
  def __init__(self, *args, **kwargs) -> None:
51
50
  input_args = list(args)
52
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
53
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
54
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
55
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
56
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
51
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
52
+ self._config: StorageManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
53
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
54
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
57
55
 
58
56
  @distributed_trace
59
- def list_by_location(self, location: str, **kwargs: Any) -> AsyncIterable["_models.Usage"]:
57
+ def list_by_location(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.Usage"]:
60
58
  """Gets the current usage count and the limit for the resources of the location under the
61
59
  subscription.
62
60
 
63
61
  :param location: The location of the Azure Storage resource. Required.
64
62
  :type location: str
65
63
  :return: An iterator like instance of either Usage or the result of cls(response)
66
- :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.Usage]
64
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.models.Usage]
67
65
  :raises ~azure.core.exceptions.HttpResponseError:
68
66
  """
69
67
  _headers = kwargs.pop("headers", {}) or {}
70
68
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
71
69
 
72
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
70
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
73
71
  cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None)
74
72
 
75
73
  error_map: MutableMapping = {
@@ -101,7 +99,7 @@ class UsagesOperations:
101
99
  for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
102
100
  }
103
101
  )
104
- _next_request_params["api-version"] = self._api_version
102
+ _next_request_params["api-version"] = self._config.api_version
105
103
  _request = HttpRequest(
106
104
  "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
107
105
  )