azure-mgmt-storage 22.0.0__py3-none-any.whl → 22.1.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 (79) hide show
  1. azure/mgmt/storage/_storage_management_client.py +76 -76
  2. azure/mgmt/storage/_version.py +1 -1
  3. azure/mgmt/storage/aio/_storage_management_client.py +76 -76
  4. azure/mgmt/storage/models.py +1 -1
  5. azure/mgmt/storage/v2016_01_01/_version.py +1 -1
  6. azure/mgmt/storage/v2017_10_01/_version.py +1 -1
  7. azure/mgmt/storage/v2019_06_01/_version.py +1 -1
  8. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/_configuration.py +2 -2
  9. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/_storage_management_client.py +49 -49
  10. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/_version.py +1 -1
  11. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/_configuration.py +2 -2
  12. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/_storage_management_client.py +49 -49
  13. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_blob_containers_operations.py +57 -57
  14. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_blob_inventory_policies_operations.py +17 -17
  15. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_blob_services_operations.py +11 -11
  16. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_deleted_accounts_operations.py +5 -5
  17. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_encryption_scopes_operations.py +18 -18
  18. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_file_services_operations.py +173 -12
  19. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_file_shares_operations.py +27 -27
  20. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_local_users_operations.py +17 -17
  21. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_management_policies_operations.py +15 -15
  22. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_network_security_perimeter_configurations_operations.py +7 -7
  23. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_object_replication_policies_operations.py +12 -12
  24. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_operations.py +3 -3
  25. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_private_endpoint_connections_operations.py +12 -12
  26. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_private_link_resources_operations.py +3 -3
  27. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_queue_operations.py +18 -18
  28. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_queue_services_operations.py +11 -11
  29. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_skus_operations.py +3 -3
  30. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_storage_accounts_operations.py +69 -69
  31. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_storage_task_assignment_instances_report_operations.py +3 -3
  32. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_storage_task_assignments_instances_report_operations.py +3 -3
  33. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_storage_task_assignments_operations.py +21 -21
  34. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_table_operations.py +18 -18
  35. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_table_services_operations.py +11 -11
  36. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_usages_operations.py +3 -3
  37. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/models/__init__.py +22 -0
  38. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/models/_models_py3.py +1132 -526
  39. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/models/_storage_management_client_enums.py +6 -0
  40. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_blob_containers_operations.py +71 -71
  41. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_blob_inventory_policies_operations.py +21 -21
  42. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_blob_services_operations.py +14 -14
  43. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_deleted_accounts_operations.py +7 -7
  44. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_encryption_scopes_operations.py +22 -22
  45. azure/mgmt/storage/v2024_01_01/operations/_file_services_operations.py +669 -0
  46. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_file_shares_operations.py +34 -34
  47. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_local_users_operations.py +23 -23
  48. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_management_policies_operations.py +18 -18
  49. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_network_security_perimeter_configurations_operations.py +10 -10
  50. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_object_replication_policies_operations.py +16 -16
  51. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_operations.py +4 -4
  52. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_private_endpoint_connections_operations.py +16 -16
  53. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_private_link_resources_operations.py +4 -4
  54. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_queue_operations.py +23 -23
  55. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_queue_services_operations.py +14 -14
  56. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_skus_operations.py +4 -4
  57. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_storage_accounts_operations.py +87 -87
  58. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_storage_task_assignment_instances_report_operations.py +4 -4
  59. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_storage_task_assignments_instances_report_operations.py +4 -4
  60. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_storage_task_assignments_operations.py +26 -26
  61. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_table_operations.py +23 -23
  62. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_table_services_operations.py +14 -14
  63. azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_usages_operations.py +4 -4
  64. {azure_mgmt_storage-22.0.0.dist-info → azure_mgmt_storage-22.1.1.dist-info}/METADATA +37 -1
  65. {azure_mgmt_storage-22.0.0.dist-info → azure_mgmt_storage-22.1.1.dist-info}/RECORD +78 -78
  66. azure/mgmt/storage/v2023_05_01/operations/_file_services_operations.py +0 -431
  67. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/__init__.py +0 -0
  68. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/_patch.py +0 -0
  69. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/__init__.py +0 -0
  70. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/_patch.py +0 -0
  71. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/__init__.py +0 -0
  72. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/aio/operations/_patch.py +0 -0
  73. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/models/_patch.py +0 -0
  74. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/__init__.py +0 -0
  75. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/operations/_patch.py +0 -0
  76. /azure/mgmt/storage/{v2023_05_01 → v2024_01_01}/py.typed +0 -0
  77. {azure_mgmt_storage-22.0.0.dist-info → azure_mgmt_storage-22.1.1.dist-info}/LICENSE +0 -0
  78. {azure_mgmt_storage-22.0.0.dist-info → azure_mgmt_storage-22.1.1.dist-info}/WHEEL +0 -0
  79. {azure_mgmt_storage-22.0.0.dist-info → azure_mgmt_storage-22.1.1.dist-info}/top_level.txt +0 -0
@@ -42,7 +42,7 @@ class DeletedAccountsOperations:
42
42
  **DO NOT** instantiate this class directly.
43
43
 
44
44
  Instead, you should access the following operations through
45
- :class:`~azure.mgmt.storage.v2023_05_01.aio.StorageManagementClient`'s
45
+ :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
46
46
  :attr:`deleted_accounts` attribute.
47
47
  """
48
48
 
@@ -62,13 +62,13 @@ class DeletedAccountsOperations:
62
62
 
63
63
  :return: An iterator like instance of either DeletedAccount or the result of cls(response)
64
64
  :rtype:
65
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2023_05_01.models.DeletedAccount]
65
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.DeletedAccount]
66
66
  :raises ~azure.core.exceptions.HttpResponseError:
67
67
  """
68
68
  _headers = kwargs.pop("headers", {}) or {}
69
69
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
70
70
 
71
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
71
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
72
72
  cls: ClsType[_models.DeletedAccountListResult] = kwargs.pop("cls", None)
73
73
 
74
74
  error_map: MutableMapping = {
@@ -141,7 +141,7 @@ class DeletedAccountsOperations:
141
141
  :param location: The location of the deleted storage account. Required.
142
142
  :type location: str
143
143
  :return: DeletedAccount or the result of cls(response)
144
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.DeletedAccount
144
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.DeletedAccount
145
145
  :raises ~azure.core.exceptions.HttpResponseError:
146
146
  """
147
147
  error_map: MutableMapping = {
@@ -155,7 +155,7 @@ class DeletedAccountsOperations:
155
155
  _headers = kwargs.pop("headers", {}) or {}
156
156
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
157
157
 
158
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
158
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
159
159
  cls: ClsType[_models.DeletedAccount] = kwargs.pop("cls", None)
160
160
 
161
161
  _request = build_get_request(
@@ -48,7 +48,7 @@ class EncryptionScopesOperations:
48
48
  **DO NOT** instantiate this class directly.
49
49
 
50
50
  Instead, you should access the following operations through
51
- :class:`~azure.mgmt.storage.v2023_05_01.aio.StorageManagementClient`'s
51
+ :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
52
52
  :attr:`encryption_scopes` attribute.
53
53
  """
54
54
 
@@ -91,12 +91,12 @@ class EncryptionScopesOperations:
91
91
  :type encryption_scope_name: str
92
92
  :param encryption_scope: Encryption scope properties to be used for the create or update.
93
93
  Required.
94
- :type encryption_scope: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
94
+ :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
95
95
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
96
96
  Default value is "application/json".
97
97
  :paramtype content_type: str
98
98
  :return: EncryptionScope or the result of cls(response)
99
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
99
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
100
100
  :raises ~azure.core.exceptions.HttpResponseError:
101
101
  """
102
102
 
@@ -134,7 +134,7 @@ class EncryptionScopesOperations:
134
134
  Default value is "application/json".
135
135
  :paramtype content_type: str
136
136
  :return: EncryptionScope or the result of cls(response)
137
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
137
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
138
138
  :raises ~azure.core.exceptions.HttpResponseError:
139
139
  """
140
140
 
@@ -165,9 +165,9 @@ class EncryptionScopesOperations:
165
165
  :type encryption_scope_name: str
166
166
  :param encryption_scope: Encryption scope properties to be used for the create or update. Is
167
167
  either a EncryptionScope type or a IO[bytes] type. Required.
168
- :type encryption_scope: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope or IO[bytes]
168
+ :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope or IO[bytes]
169
169
  :return: EncryptionScope or the result of cls(response)
170
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
170
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
171
171
  :raises ~azure.core.exceptions.HttpResponseError:
172
172
  """
173
173
  error_map: MutableMapping = {
@@ -181,7 +181,7 @@ class EncryptionScopesOperations:
181
181
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
182
182
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
183
183
 
184
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
184
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
185
185
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
186
186
  cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
187
187
 
@@ -253,12 +253,12 @@ class EncryptionScopesOperations:
253
253
  followed by a letter or number. Required.
254
254
  :type encryption_scope_name: str
255
255
  :param encryption_scope: Encryption scope properties to be used for the update. Required.
256
- :type encryption_scope: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
256
+ :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
257
257
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
258
258
  Default value is "application/json".
259
259
  :paramtype content_type: str
260
260
  :return: EncryptionScope or the result of cls(response)
261
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
261
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
262
262
  :raises ~azure.core.exceptions.HttpResponseError:
263
263
  """
264
264
 
@@ -294,7 +294,7 @@ class EncryptionScopesOperations:
294
294
  Default value is "application/json".
295
295
  :paramtype content_type: str
296
296
  :return: EncryptionScope or the result of cls(response)
297
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
297
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
298
298
  :raises ~azure.core.exceptions.HttpResponseError:
299
299
  """
300
300
 
@@ -324,9 +324,9 @@ class EncryptionScopesOperations:
324
324
  :type encryption_scope_name: str
325
325
  :param encryption_scope: Encryption scope properties to be used for the update. Is either a
326
326
  EncryptionScope type or a IO[bytes] type. Required.
327
- :type encryption_scope: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope or IO[bytes]
327
+ :type encryption_scope: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope or IO[bytes]
328
328
  :return: EncryptionScope or the result of cls(response)
329
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
329
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
330
330
  :raises ~azure.core.exceptions.HttpResponseError:
331
331
  """
332
332
  error_map: MutableMapping = {
@@ -340,7 +340,7 @@ class EncryptionScopesOperations:
340
340
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
341
341
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
342
342
 
343
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
343
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
344
344
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
345
345
  cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
346
346
 
@@ -404,7 +404,7 @@ class EncryptionScopesOperations:
404
404
  followed by a letter or number. Required.
405
405
  :type encryption_scope_name: str
406
406
  :return: EncryptionScope or the result of cls(response)
407
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.EncryptionScope
407
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.EncryptionScope
408
408
  :raises ~azure.core.exceptions.HttpResponseError:
409
409
  """
410
410
  error_map: MutableMapping = {
@@ -418,7 +418,7 @@ class EncryptionScopesOperations:
418
418
  _headers = kwargs.pop("headers", {}) or {}
419
419
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
420
420
 
421
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
421
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
422
422
  cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
423
423
 
424
424
  _request = build_get_request(
@@ -478,16 +478,16 @@ class EncryptionScopesOperations:
478
478
  :type filter: str
479
479
  :param include: Optional, when specified, will list encryption scopes with the specific state.
480
480
  Defaults to All. Known values are: "All", "Enabled", and "Disabled". Default value is None.
481
- :type include: str or ~azure.mgmt.storage.v2023_05_01.models.ListEncryptionScopesInclude
481
+ :type include: str or ~azure.mgmt.storage.v2024_01_01.models.ListEncryptionScopesInclude
482
482
  :return: An iterator like instance of either EncryptionScope or the result of cls(response)
483
483
  :rtype:
484
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2023_05_01.models.EncryptionScope]
484
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.EncryptionScope]
485
485
  :raises ~azure.core.exceptions.HttpResponseError:
486
486
  """
487
487
  _headers = kwargs.pop("headers", {}) or {}
488
488
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
489
489
 
490
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
490
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
491
491
  cls: ClsType[_models.EncryptionScopeListResult] = kwargs.pop("cls", None)
492
492
 
493
493
  error_map: MutableMapping = {
@@ -7,8 +7,10 @@
7
7
  # --------------------------------------------------------------------------
8
8
  from io import IOBase
9
9
  import sys
10
- from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
10
+ from typing import Any, AsyncIterable, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
11
+ import urllib.parse
11
12
 
13
+ from azure.core.async_paging import AsyncItemPaged, AsyncList
12
14
  from azure.core.exceptions import (
13
15
  ClientAuthenticationError,
14
16
  HttpResponseError,
@@ -19,6 +21,7 @@ from azure.core.exceptions import (
19
21
  )
20
22
  from azure.core.pipeline import PipelineResponse
21
23
  from azure.core.rest import AsyncHttpResponse, HttpRequest
24
+ from azure.core.tracing.decorator import distributed_trace
22
25
  from azure.core.tracing.decorator_async import distributed_trace_async
23
26
  from azure.core.utils import case_insensitive_dict
24
27
  from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -26,7 +29,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat
26
29
  from ... import models as _models
27
30
  from ...operations._file_services_operations import (
28
31
  build_get_service_properties_request,
32
+ build_get_service_usage_request,
29
33
  build_list_request,
34
+ build_list_service_usages_request,
30
35
  build_set_service_properties_request,
31
36
  )
32
37
 
@@ -44,7 +49,7 @@ class FileServicesOperations:
44
49
  **DO NOT** instantiate this class directly.
45
50
 
46
51
  Instead, you should access the following operations through
47
- :class:`~azure.mgmt.storage.v2023_05_01.aio.StorageManagementClient`'s
52
+ :class:`~azure.mgmt.storage.v2024_01_01.aio.StorageManagementClient`'s
48
53
  :attr:`file_services` attribute.
49
54
  """
50
55
 
@@ -70,7 +75,7 @@ class FileServicesOperations:
70
75
  lower-case letters only. Required.
71
76
  :type account_name: str
72
77
  :return: FileServiceItems or the result of cls(response)
73
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.FileServiceItems
78
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceItems
74
79
  :raises ~azure.core.exceptions.HttpResponseError:
75
80
  """
76
81
  error_map: MutableMapping = {
@@ -84,7 +89,7 @@ class FileServicesOperations:
84
89
  _headers = kwargs.pop("headers", {}) or {}
85
90
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
86
91
 
87
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
92
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
88
93
  cls: ClsType[_models.FileServiceItems] = kwargs.pop("cls", None)
89
94
 
90
95
  _request = build_list_request(
@@ -137,12 +142,12 @@ class FileServicesOperations:
137
142
  :type account_name: str
138
143
  :param parameters: The properties of file services in storage accounts, including CORS
139
144
  (Cross-Origin Resource Sharing) rules. Required.
140
- :type parameters: ~azure.mgmt.storage.v2023_05_01.models.FileServiceProperties
145
+ :type parameters: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
141
146
  :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
142
147
  Default value is "application/json".
143
148
  :paramtype content_type: str
144
149
  :return: FileServiceProperties or the result of cls(response)
145
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.FileServiceProperties
150
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
146
151
  :raises ~azure.core.exceptions.HttpResponseError:
147
152
  """
148
153
 
@@ -173,7 +178,7 @@ class FileServicesOperations:
173
178
  Default value is "application/json".
174
179
  :paramtype content_type: str
175
180
  :return: FileServiceProperties or the result of cls(response)
176
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.FileServiceProperties
181
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
177
182
  :raises ~azure.core.exceptions.HttpResponseError:
178
183
  """
179
184
 
@@ -198,9 +203,9 @@ class FileServicesOperations:
198
203
  :param parameters: The properties of file services in storage accounts, including CORS
199
204
  (Cross-Origin Resource Sharing) rules. Is either a FileServiceProperties type or a IO[bytes]
200
205
  type. Required.
201
- :type parameters: ~azure.mgmt.storage.v2023_05_01.models.FileServiceProperties or IO[bytes]
206
+ :type parameters: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties or IO[bytes]
202
207
  :return: FileServiceProperties or the result of cls(response)
203
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.FileServiceProperties
208
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
204
209
  :raises ~azure.core.exceptions.HttpResponseError:
205
210
  """
206
211
  error_map: MutableMapping = {
@@ -214,7 +219,7 @@ class FileServicesOperations:
214
219
  _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
215
220
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
216
221
 
217
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
222
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
218
223
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
219
224
  content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
220
225
  cls: ClsType[_models.FileServiceProperties] = kwargs.pop("cls", None)
@@ -274,7 +279,7 @@ class FileServicesOperations:
274
279
  lower-case letters only. Required.
275
280
  :type account_name: str
276
281
  :return: FileServiceProperties or the result of cls(response)
277
- :rtype: ~azure.mgmt.storage.v2023_05_01.models.FileServiceProperties
282
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceProperties
278
283
  :raises ~azure.core.exceptions.HttpResponseError:
279
284
  """
280
285
  error_map: MutableMapping = {
@@ -288,7 +293,7 @@ class FileServicesOperations:
288
293
  _headers = kwargs.pop("headers", {}) or {}
289
294
  _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
290
295
 
291
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2023-05-01"))
296
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
292
297
  file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
293
298
  cls: ClsType[_models.FileServiceProperties] = kwargs.pop("cls", None)
294
299
 
@@ -320,3 +325,159 @@ class FileServicesOperations:
320
325
  return cls(pipeline_response, deserialized, {}) # type: ignore
321
326
 
322
327
  return deserialized # type: ignore
328
+
329
+ @distributed_trace
330
+ def list_service_usages(
331
+ self, resource_group_name: str, account_name: str, maxpagesize: Optional[int] = None, **kwargs: Any
332
+ ) -> AsyncIterable["_models.FileServiceUsage"]:
333
+ """Gets the usages of file service in storage account.
334
+
335
+ :param resource_group_name: The name of the resource group within the user's subscription. The
336
+ name is case insensitive. Required.
337
+ :type resource_group_name: str
338
+ :param account_name: The name of the storage account within the specified resource group.
339
+ Storage account names must be between 3 and 24 characters in length and use numbers and
340
+ lower-case letters only. Required.
341
+ :type account_name: str
342
+ :param maxpagesize: Optional, specifies the maximum number of file service usages to be
343
+ included in the list response. Default value is None.
344
+ :type maxpagesize: int
345
+ :return: An iterator like instance of either FileServiceUsage or the result of cls(response)
346
+ :rtype:
347
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2024_01_01.models.FileServiceUsage]
348
+ :raises ~azure.core.exceptions.HttpResponseError:
349
+ """
350
+ _headers = kwargs.pop("headers", {}) or {}
351
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
352
+
353
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
354
+ file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
355
+ cls: ClsType[_models.FileServiceUsages] = kwargs.pop("cls", None)
356
+
357
+ error_map: MutableMapping = {
358
+ 401: ClientAuthenticationError,
359
+ 404: ResourceNotFoundError,
360
+ 409: ResourceExistsError,
361
+ 304: ResourceNotModifiedError,
362
+ }
363
+ error_map.update(kwargs.pop("error_map", {}) or {})
364
+
365
+ def prepare_request(next_link=None):
366
+ if not next_link:
367
+
368
+ _request = build_list_service_usages_request(
369
+ resource_group_name=resource_group_name,
370
+ account_name=account_name,
371
+ subscription_id=self._config.subscription_id,
372
+ maxpagesize=maxpagesize,
373
+ api_version=api_version,
374
+ file_services_name=file_services_name,
375
+ headers=_headers,
376
+ params=_params,
377
+ )
378
+ _request.url = self._client.format_url(_request.url)
379
+
380
+ else:
381
+ # make call to next link with the client's api-version
382
+ _parsed_next_link = urllib.parse.urlparse(next_link)
383
+ _next_request_params = case_insensitive_dict(
384
+ {
385
+ key: [urllib.parse.quote(v) for v in value]
386
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
387
+ }
388
+ )
389
+ _next_request_params["api-version"] = self._api_version
390
+ _request = HttpRequest(
391
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
392
+ )
393
+ _request.url = self._client.format_url(_request.url)
394
+ _request.method = "GET"
395
+ return _request
396
+
397
+ async def extract_data(pipeline_response):
398
+ deserialized = self._deserialize("FileServiceUsages", pipeline_response)
399
+ list_of_elem = deserialized.value
400
+ if cls:
401
+ list_of_elem = cls(list_of_elem) # type: ignore
402
+ return deserialized.next_link or None, AsyncList(list_of_elem)
403
+
404
+ async def get_next(next_link=None):
405
+ _request = prepare_request(next_link)
406
+
407
+ _stream = False
408
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
409
+ _request, stream=_stream, **kwargs
410
+ )
411
+ response = pipeline_response.http_response
412
+
413
+ if response.status_code not in [200]:
414
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
415
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
416
+
417
+ return pipeline_response
418
+
419
+ return AsyncItemPaged(get_next, extract_data)
420
+
421
+ @distributed_trace_async
422
+ async def get_service_usage(
423
+ self, resource_group_name: str, account_name: str, **kwargs: Any
424
+ ) -> _models.FileServiceUsage:
425
+ """Gets the usage of file service in storage account including account limits, file share limits
426
+ and constants used in recommendations and bursting formula.
427
+
428
+ :param resource_group_name: The name of the resource group within the user's subscription. The
429
+ name is case insensitive. Required.
430
+ :type resource_group_name: str
431
+ :param account_name: The name of the storage account within the specified resource group.
432
+ Storage account names must be between 3 and 24 characters in length and use numbers and
433
+ lower-case letters only. Required.
434
+ :type account_name: str
435
+ :return: FileServiceUsage or the result of cls(response)
436
+ :rtype: ~azure.mgmt.storage.v2024_01_01.models.FileServiceUsage
437
+ :raises ~azure.core.exceptions.HttpResponseError:
438
+ """
439
+ error_map: MutableMapping = {
440
+ 401: ClientAuthenticationError,
441
+ 404: ResourceNotFoundError,
442
+ 409: ResourceExistsError,
443
+ 304: ResourceNotModifiedError,
444
+ }
445
+ error_map.update(kwargs.pop("error_map", {}) or {})
446
+
447
+ _headers = kwargs.pop("headers", {}) or {}
448
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
449
+
450
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2024-01-01"))
451
+ file_services_name: Literal["default"] = kwargs.pop("file_services_name", "default")
452
+ file_service_usages_name: Literal["default"] = kwargs.pop("file_service_usages_name", "default")
453
+ cls: ClsType[_models.FileServiceUsage] = kwargs.pop("cls", None)
454
+
455
+ _request = build_get_service_usage_request(
456
+ resource_group_name=resource_group_name,
457
+ account_name=account_name,
458
+ subscription_id=self._config.subscription_id,
459
+ api_version=api_version,
460
+ file_services_name=file_services_name,
461
+ file_service_usages_name=file_service_usages_name,
462
+ headers=_headers,
463
+ params=_params,
464
+ )
465
+ _request.url = self._client.format_url(_request.url)
466
+
467
+ _stream = False
468
+ pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
469
+ _request, stream=_stream, **kwargs
470
+ )
471
+
472
+ response = pipeline_response.http_response
473
+
474
+ if response.status_code not in [200]:
475
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
476
+ raise HttpResponseError(response=response, error_format=ARMErrorFormat)
477
+
478
+ deserialized = self._deserialize("FileServiceUsage", pipeline_response.http_response)
479
+
480
+ if cls:
481
+ return cls(pipeline_response, deserialized, {}) # type: ignore
482
+
483
+ return deserialized # type: ignore