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
@@ -1,771 +0,0 @@
1
- # coding=utf-8
2
- # --------------------------------------------------------------------------
3
- # Copyright (c) Microsoft Corporation. All rights reserved.
4
- # Licensed under the MIT License. See License.txt in the project root for license information.
5
- # Code generated by Microsoft (R) AutoRest Code Generator.
6
- # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- # --------------------------------------------------------------------------
8
- from io import IOBase
9
- import sys
10
- from typing import Any, AsyncIterable, Callable, Dict, IO, Literal, Optional, TypeVar, Union, overload
11
- import urllib.parse
12
-
13
- from azure.core.async_paging import AsyncItemPaged, AsyncList
14
- from azure.core.exceptions import (
15
- ClientAuthenticationError,
16
- HttpResponseError,
17
- ResourceExistsError,
18
- ResourceNotFoundError,
19
- ResourceNotModifiedError,
20
- map_error,
21
- )
22
- from azure.core.pipeline import PipelineResponse
23
- from azure.core.rest import AsyncHttpResponse, HttpRequest
24
- from azure.core.tracing.decorator import distributed_trace
25
- from azure.core.tracing.decorator_async import distributed_trace_async
26
- from azure.core.utils import case_insensitive_dict
27
- from azure.mgmt.core.exceptions import ARMErrorFormat
28
-
29
- from ... import models as _models
30
- from ...operations._file_shares_operations import (
31
- build_create_request,
32
- build_delete_request,
33
- build_get_request,
34
- build_list_request,
35
- build_restore_request,
36
- build_update_request,
37
- )
38
-
39
- if sys.version_info >= (3, 9):
40
- from collections.abc import MutableMapping
41
- else:
42
- from typing import MutableMapping # type: ignore
43
- T = TypeVar("T")
44
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
45
-
46
-
47
- class FileSharesOperations:
48
- """
49
- .. warning::
50
- **DO NOT** instantiate this class directly.
51
-
52
- Instead, you should access the following operations through
53
- :class:`~azure.mgmt.storage.v2019_06_01.aio.StorageManagementClient`'s
54
- :attr:`file_shares` attribute.
55
- """
56
-
57
- models = _models
58
-
59
- def __init__(self, *args, **kwargs) -> None:
60
- input_args = list(args)
61
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
62
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
63
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
64
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
65
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
66
-
67
- @distributed_trace
68
- def list(
69
- self,
70
- resource_group_name: str,
71
- account_name: str,
72
- maxpagesize: Optional[str] = None,
73
- filter: Optional[str] = None,
74
- expand: Literal["deleted"] = "deleted",
75
- **kwargs: Any
76
- ) -> AsyncIterable["_models.FileShareItem"]:
77
- """Lists all shares.
78
-
79
- :param resource_group_name: The name of the resource group within the user's subscription. The
80
- name is case insensitive. Required.
81
- :type resource_group_name: str
82
- :param account_name: The name of the storage account within the specified resource group.
83
- Storage account names must be between 3 and 24 characters in length and use numbers and
84
- lower-case letters only. Required.
85
- :type account_name: str
86
- :param maxpagesize: Optional. Specified maximum number of shares that can be included in the
87
- list. Default value is None.
88
- :type maxpagesize: str
89
- :param filter: Optional. When specified, only share names starting with the filter will be
90
- listed. Default value is None.
91
- :type filter: str
92
- :param expand: Optional, used to expand the properties within share's properties. Known values
93
- are "deleted" and None. Default value is "deleted".
94
- :type expand: str
95
- :return: An iterator like instance of either FileShareItem or the result of cls(response)
96
- :rtype:
97
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2019_06_01.models.FileShareItem]
98
- :raises ~azure.core.exceptions.HttpResponseError:
99
- """
100
- _headers = kwargs.pop("headers", {}) or {}
101
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
102
-
103
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
104
- cls: ClsType[_models.FileShareItems] = kwargs.pop("cls", None)
105
-
106
- error_map: MutableMapping = {
107
- 401: ClientAuthenticationError,
108
- 404: ResourceNotFoundError,
109
- 409: ResourceExistsError,
110
- 304: ResourceNotModifiedError,
111
- }
112
- error_map.update(kwargs.pop("error_map", {}) or {})
113
-
114
- def prepare_request(next_link=None):
115
- if not next_link:
116
-
117
- _request = build_list_request(
118
- resource_group_name=resource_group_name,
119
- account_name=account_name,
120
- subscription_id=self._config.subscription_id,
121
- maxpagesize=maxpagesize,
122
- filter=filter,
123
- expand=expand,
124
- api_version=api_version,
125
- headers=_headers,
126
- params=_params,
127
- )
128
- _request.url = self._client.format_url(_request.url)
129
-
130
- else:
131
- # make call to next link with the client's api-version
132
- _parsed_next_link = urllib.parse.urlparse(next_link)
133
- _next_request_params = case_insensitive_dict(
134
- {
135
- key: [urllib.parse.quote(v) for v in value]
136
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
137
- }
138
- )
139
- _next_request_params["api-version"] = self._api_version
140
- _request = HttpRequest(
141
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
142
- )
143
- _request.url = self._client.format_url(_request.url)
144
- _request.method = "GET"
145
- return _request
146
-
147
- async def extract_data(pipeline_response):
148
- deserialized = self._deserialize("FileShareItems", pipeline_response)
149
- list_of_elem = deserialized.value
150
- if cls:
151
- list_of_elem = cls(list_of_elem) # type: ignore
152
- return deserialized.next_link or None, AsyncList(list_of_elem)
153
-
154
- async def get_next(next_link=None):
155
- _request = prepare_request(next_link)
156
-
157
- _stream = False
158
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
159
- _request, stream=_stream, **kwargs
160
- )
161
- response = pipeline_response.http_response
162
-
163
- if response.status_code not in [200]:
164
- map_error(status_code=response.status_code, response=response, error_map=error_map)
165
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
166
-
167
- return pipeline_response
168
-
169
- return AsyncItemPaged(get_next, extract_data)
170
-
171
- @overload
172
- async def create(
173
- self,
174
- resource_group_name: str,
175
- account_name: str,
176
- share_name: str,
177
- file_share: _models.FileShare,
178
- *,
179
- content_type: str = "application/json",
180
- **kwargs: Any
181
- ) -> _models.FileShare:
182
- """Creates a new share under the specified account as described by request body. The share
183
- resource includes metadata and properties for that share. It does not include a list of the
184
- files contained by the share.
185
-
186
- :param resource_group_name: The name of the resource group within the user's subscription. The
187
- name is case insensitive. Required.
188
- :type resource_group_name: str
189
- :param account_name: The name of the storage account within the specified resource group.
190
- Storage account names must be between 3 and 24 characters in length and use numbers and
191
- lower-case letters only. Required.
192
- :type account_name: str
193
- :param share_name: The name of the file share within the specified storage account. File share
194
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
195
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
196
- or number. Required.
197
- :type share_name: str
198
- :param file_share: Properties of the file share to create. Required.
199
- :type file_share: ~azure.mgmt.storage.v2019_06_01.models.FileShare
200
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
201
- Default value is "application/json".
202
- :paramtype content_type: str
203
- :return: FileShare or the result of cls(response)
204
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
205
- :raises ~azure.core.exceptions.HttpResponseError:
206
- """
207
-
208
- @overload
209
- async def create(
210
- self,
211
- resource_group_name: str,
212
- account_name: str,
213
- share_name: str,
214
- file_share: IO[bytes],
215
- *,
216
- content_type: str = "application/json",
217
- **kwargs: Any
218
- ) -> _models.FileShare:
219
- """Creates a new share under the specified account as described by request body. The share
220
- resource includes metadata and properties for that share. It does not include a list of the
221
- files contained by the share.
222
-
223
- :param resource_group_name: The name of the resource group within the user's subscription. The
224
- name is case insensitive. Required.
225
- :type resource_group_name: str
226
- :param account_name: The name of the storage account within the specified resource group.
227
- Storage account names must be between 3 and 24 characters in length and use numbers and
228
- lower-case letters only. Required.
229
- :type account_name: str
230
- :param share_name: The name of the file share within the specified storage account. File share
231
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
232
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
233
- or number. Required.
234
- :type share_name: str
235
- :param file_share: Properties of the file share to create. Required.
236
- :type file_share: IO[bytes]
237
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
238
- Default value is "application/json".
239
- :paramtype content_type: str
240
- :return: FileShare or the result of cls(response)
241
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
242
- :raises ~azure.core.exceptions.HttpResponseError:
243
- """
244
-
245
- @distributed_trace_async
246
- async def create(
247
- self,
248
- resource_group_name: str,
249
- account_name: str,
250
- share_name: str,
251
- file_share: Union[_models.FileShare, IO[bytes]],
252
- **kwargs: Any
253
- ) -> _models.FileShare:
254
- """Creates a new share under the specified account as described by request body. The share
255
- resource includes metadata and properties for that share. It does not include a list of the
256
- files contained by the share.
257
-
258
- :param resource_group_name: The name of the resource group within the user's subscription. The
259
- name is case insensitive. Required.
260
- :type resource_group_name: str
261
- :param account_name: The name of the storage account within the specified resource group.
262
- Storage account names must be between 3 and 24 characters in length and use numbers and
263
- lower-case letters only. Required.
264
- :type account_name: str
265
- :param share_name: The name of the file share within the specified storage account. File share
266
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
267
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
268
- or number. Required.
269
- :type share_name: str
270
- :param file_share: Properties of the file share to create. Is either a FileShare type or a
271
- IO[bytes] type. Required.
272
- :type file_share: ~azure.mgmt.storage.v2019_06_01.models.FileShare or IO[bytes]
273
- :return: FileShare or the result of cls(response)
274
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
275
- :raises ~azure.core.exceptions.HttpResponseError:
276
- """
277
- error_map: MutableMapping = {
278
- 401: ClientAuthenticationError,
279
- 404: ResourceNotFoundError,
280
- 409: ResourceExistsError,
281
- 304: ResourceNotModifiedError,
282
- }
283
- error_map.update(kwargs.pop("error_map", {}) or {})
284
-
285
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
286
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
287
-
288
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
289
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
290
- cls: ClsType[_models.FileShare] = kwargs.pop("cls", None)
291
-
292
- content_type = content_type or "application/json"
293
- _json = None
294
- _content = None
295
- if isinstance(file_share, (IOBase, bytes)):
296
- _content = file_share
297
- else:
298
- _json = self._serialize.body(file_share, "FileShare")
299
-
300
- _request = build_create_request(
301
- resource_group_name=resource_group_name,
302
- account_name=account_name,
303
- share_name=share_name,
304
- subscription_id=self._config.subscription_id,
305
- api_version=api_version,
306
- content_type=content_type,
307
- json=_json,
308
- content=_content,
309
- headers=_headers,
310
- params=_params,
311
- )
312
- _request.url = self._client.format_url(_request.url)
313
-
314
- _stream = False
315
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
316
- _request, stream=_stream, **kwargs
317
- )
318
-
319
- response = pipeline_response.http_response
320
-
321
- if response.status_code not in [200, 201]:
322
- map_error(status_code=response.status_code, response=response, error_map=error_map)
323
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
324
-
325
- deserialized = self._deserialize("FileShare", pipeline_response.http_response)
326
-
327
- if cls:
328
- return cls(pipeline_response, deserialized, {}) # type: ignore
329
-
330
- return deserialized # type: ignore
331
-
332
- @overload
333
- async def update(
334
- self,
335
- resource_group_name: str,
336
- account_name: str,
337
- share_name: str,
338
- file_share: _models.FileShare,
339
- *,
340
- content_type: str = "application/json",
341
- **kwargs: Any
342
- ) -> _models.FileShare:
343
- """Updates share properties as specified in request body. Properties not mentioned in the request
344
- will not be changed. Update fails if the specified share does not already exist.
345
-
346
- :param resource_group_name: The name of the resource group within the user's subscription. The
347
- name is case insensitive. Required.
348
- :type resource_group_name: str
349
- :param account_name: The name of the storage account within the specified resource group.
350
- Storage account names must be between 3 and 24 characters in length and use numbers and
351
- lower-case letters only. Required.
352
- :type account_name: str
353
- :param share_name: The name of the file share within the specified storage account. File share
354
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
355
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
356
- or number. Required.
357
- :type share_name: str
358
- :param file_share: Properties to update for the file share. Required.
359
- :type file_share: ~azure.mgmt.storage.v2019_06_01.models.FileShare
360
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
361
- Default value is "application/json".
362
- :paramtype content_type: str
363
- :return: FileShare or the result of cls(response)
364
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
365
- :raises ~azure.core.exceptions.HttpResponseError:
366
- """
367
-
368
- @overload
369
- async def update(
370
- self,
371
- resource_group_name: str,
372
- account_name: str,
373
- share_name: str,
374
- file_share: IO[bytes],
375
- *,
376
- content_type: str = "application/json",
377
- **kwargs: Any
378
- ) -> _models.FileShare:
379
- """Updates share properties as specified in request body. Properties not mentioned in the request
380
- will not be changed. Update fails if the specified share does not already exist.
381
-
382
- :param resource_group_name: The name of the resource group within the user's subscription. The
383
- name is case insensitive. Required.
384
- :type resource_group_name: str
385
- :param account_name: The name of the storage account within the specified resource group.
386
- Storage account names must be between 3 and 24 characters in length and use numbers and
387
- lower-case letters only. Required.
388
- :type account_name: str
389
- :param share_name: The name of the file share within the specified storage account. File share
390
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
391
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
392
- or number. Required.
393
- :type share_name: str
394
- :param file_share: Properties to update for the file share. Required.
395
- :type file_share: IO[bytes]
396
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
397
- Default value is "application/json".
398
- :paramtype content_type: str
399
- :return: FileShare or the result of cls(response)
400
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
401
- :raises ~azure.core.exceptions.HttpResponseError:
402
- """
403
-
404
- @distributed_trace_async
405
- async def update(
406
- self,
407
- resource_group_name: str,
408
- account_name: str,
409
- share_name: str,
410
- file_share: Union[_models.FileShare, IO[bytes]],
411
- **kwargs: Any
412
- ) -> _models.FileShare:
413
- """Updates share properties as specified in request body. Properties not mentioned in the request
414
- will not be changed. Update fails if the specified share does not already exist.
415
-
416
- :param resource_group_name: The name of the resource group within the user's subscription. The
417
- name is case insensitive. Required.
418
- :type resource_group_name: str
419
- :param account_name: The name of the storage account within the specified resource group.
420
- Storage account names must be between 3 and 24 characters in length and use numbers and
421
- lower-case letters only. Required.
422
- :type account_name: str
423
- :param share_name: The name of the file share within the specified storage account. File share
424
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
425
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
426
- or number. Required.
427
- :type share_name: str
428
- :param file_share: Properties to update for the file share. Is either a FileShare type or a
429
- IO[bytes] type. Required.
430
- :type file_share: ~azure.mgmt.storage.v2019_06_01.models.FileShare or IO[bytes]
431
- :return: FileShare or the result of cls(response)
432
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
433
- :raises ~azure.core.exceptions.HttpResponseError:
434
- """
435
- error_map: MutableMapping = {
436
- 401: ClientAuthenticationError,
437
- 404: ResourceNotFoundError,
438
- 409: ResourceExistsError,
439
- 304: ResourceNotModifiedError,
440
- }
441
- error_map.update(kwargs.pop("error_map", {}) or {})
442
-
443
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
444
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
445
-
446
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
447
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
448
- cls: ClsType[_models.FileShare] = kwargs.pop("cls", None)
449
-
450
- content_type = content_type or "application/json"
451
- _json = None
452
- _content = None
453
- if isinstance(file_share, (IOBase, bytes)):
454
- _content = file_share
455
- else:
456
- _json = self._serialize.body(file_share, "FileShare")
457
-
458
- _request = build_update_request(
459
- resource_group_name=resource_group_name,
460
- account_name=account_name,
461
- share_name=share_name,
462
- subscription_id=self._config.subscription_id,
463
- api_version=api_version,
464
- content_type=content_type,
465
- json=_json,
466
- content=_content,
467
- headers=_headers,
468
- params=_params,
469
- )
470
- _request.url = self._client.format_url(_request.url)
471
-
472
- _stream = False
473
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
474
- _request, stream=_stream, **kwargs
475
- )
476
-
477
- response = pipeline_response.http_response
478
-
479
- if response.status_code not in [200]:
480
- map_error(status_code=response.status_code, response=response, error_map=error_map)
481
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
482
-
483
- deserialized = self._deserialize("FileShare", pipeline_response.http_response)
484
-
485
- if cls:
486
- return cls(pipeline_response, deserialized, {}) # type: ignore
487
-
488
- return deserialized # type: ignore
489
-
490
- @distributed_trace_async
491
- async def get(
492
- self,
493
- resource_group_name: str,
494
- account_name: str,
495
- share_name: str,
496
- expand: Literal["stats"] = "stats",
497
- **kwargs: Any
498
- ) -> _models.FileShare:
499
- """Gets properties of a specified share.
500
-
501
- :param resource_group_name: The name of the resource group within the user's subscription. The
502
- name is case insensitive. Required.
503
- :type resource_group_name: str
504
- :param account_name: The name of the storage account within the specified resource group.
505
- Storage account names must be between 3 and 24 characters in length and use numbers and
506
- lower-case letters only. Required.
507
- :type account_name: str
508
- :param share_name: The name of the file share within the specified storage account. File share
509
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
510
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
511
- or number. Required.
512
- :type share_name: str
513
- :param expand: Optional, used to expand the properties within share's properties. Known values
514
- are "stats" and None. Default value is "stats".
515
- :type expand: str
516
- :return: FileShare or the result of cls(response)
517
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.FileShare
518
- :raises ~azure.core.exceptions.HttpResponseError:
519
- """
520
- error_map: MutableMapping = {
521
- 401: ClientAuthenticationError,
522
- 404: ResourceNotFoundError,
523
- 409: ResourceExistsError,
524
- 304: ResourceNotModifiedError,
525
- }
526
- error_map.update(kwargs.pop("error_map", {}) or {})
527
-
528
- _headers = kwargs.pop("headers", {}) or {}
529
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
530
-
531
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
532
- cls: ClsType[_models.FileShare] = kwargs.pop("cls", None)
533
-
534
- _request = build_get_request(
535
- resource_group_name=resource_group_name,
536
- account_name=account_name,
537
- share_name=share_name,
538
- subscription_id=self._config.subscription_id,
539
- expand=expand,
540
- api_version=api_version,
541
- headers=_headers,
542
- params=_params,
543
- )
544
- _request.url = self._client.format_url(_request.url)
545
-
546
- _stream = False
547
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
548
- _request, stream=_stream, **kwargs
549
- )
550
-
551
- response = pipeline_response.http_response
552
-
553
- if response.status_code not in [200]:
554
- map_error(status_code=response.status_code, response=response, error_map=error_map)
555
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
556
-
557
- deserialized = self._deserialize("FileShare", pipeline_response.http_response)
558
-
559
- if cls:
560
- return cls(pipeline_response, deserialized, {}) # type: ignore
561
-
562
- return deserialized # type: ignore
563
-
564
- @distributed_trace_async
565
- async def delete(self, resource_group_name: str, account_name: str, share_name: str, **kwargs: Any) -> None:
566
- """Deletes specified share under its account.
567
-
568
- :param resource_group_name: The name of the resource group within the user's subscription. The
569
- name is case insensitive. Required.
570
- :type resource_group_name: str
571
- :param account_name: The name of the storage account within the specified resource group.
572
- Storage account names must be between 3 and 24 characters in length and use numbers and
573
- lower-case letters only. Required.
574
- :type account_name: str
575
- :param share_name: The name of the file share within the specified storage account. File share
576
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
577
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
578
- or number. Required.
579
- :type share_name: str
580
- :return: None or the result of cls(response)
581
- :rtype: None
582
- :raises ~azure.core.exceptions.HttpResponseError:
583
- """
584
- error_map: MutableMapping = {
585
- 401: ClientAuthenticationError,
586
- 404: ResourceNotFoundError,
587
- 409: ResourceExistsError,
588
- 304: ResourceNotModifiedError,
589
- }
590
- error_map.update(kwargs.pop("error_map", {}) or {})
591
-
592
- _headers = kwargs.pop("headers", {}) or {}
593
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
594
-
595
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
596
- cls: ClsType[None] = kwargs.pop("cls", None)
597
-
598
- _request = build_delete_request(
599
- resource_group_name=resource_group_name,
600
- account_name=account_name,
601
- share_name=share_name,
602
- subscription_id=self._config.subscription_id,
603
- api_version=api_version,
604
- headers=_headers,
605
- params=_params,
606
- )
607
- _request.url = self._client.format_url(_request.url)
608
-
609
- _stream = False
610
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
611
- _request, stream=_stream, **kwargs
612
- )
613
-
614
- response = pipeline_response.http_response
615
-
616
- if response.status_code not in [200, 204]:
617
- map_error(status_code=response.status_code, response=response, error_map=error_map)
618
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
619
-
620
- if cls:
621
- return cls(pipeline_response, None, {}) # type: ignore
622
-
623
- @overload
624
- async def restore(
625
- self,
626
- resource_group_name: str,
627
- account_name: str,
628
- share_name: str,
629
- deleted_share: _models.DeletedShare,
630
- *,
631
- content_type: str = "application/json",
632
- **kwargs: Any
633
- ) -> None:
634
- """Restore a file share within a valid retention days if share soft delete is enabled.
635
-
636
- :param resource_group_name: The name of the resource group within the user's subscription. The
637
- name is case insensitive. Required.
638
- :type resource_group_name: str
639
- :param account_name: The name of the storage account within the specified resource group.
640
- Storage account names must be between 3 and 24 characters in length and use numbers and
641
- lower-case letters only. Required.
642
- :type account_name: str
643
- :param share_name: The name of the file share within the specified storage account. File share
644
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
645
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
646
- or number. Required.
647
- :type share_name: str
648
- :param deleted_share: Required.
649
- :type deleted_share: ~azure.mgmt.storage.v2019_06_01.models.DeletedShare
650
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
651
- Default value is "application/json".
652
- :paramtype content_type: str
653
- :return: None or the result of cls(response)
654
- :rtype: None
655
- :raises ~azure.core.exceptions.HttpResponseError:
656
- """
657
-
658
- @overload
659
- async def restore(
660
- self,
661
- resource_group_name: str,
662
- account_name: str,
663
- share_name: str,
664
- deleted_share: IO[bytes],
665
- *,
666
- content_type: str = "application/json",
667
- **kwargs: Any
668
- ) -> None:
669
- """Restore a file share within a valid retention days if share soft delete is enabled.
670
-
671
- :param resource_group_name: The name of the resource group within the user's subscription. The
672
- name is case insensitive. Required.
673
- :type resource_group_name: str
674
- :param account_name: The name of the storage account within the specified resource group.
675
- Storage account names must be between 3 and 24 characters in length and use numbers and
676
- lower-case letters only. Required.
677
- :type account_name: str
678
- :param share_name: The name of the file share within the specified storage account. File share
679
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
680
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
681
- or number. Required.
682
- :type share_name: str
683
- :param deleted_share: Required.
684
- :type deleted_share: IO[bytes]
685
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
686
- Default value is "application/json".
687
- :paramtype content_type: str
688
- :return: None or the result of cls(response)
689
- :rtype: None
690
- :raises ~azure.core.exceptions.HttpResponseError:
691
- """
692
-
693
- @distributed_trace_async
694
- async def restore(
695
- self,
696
- resource_group_name: str,
697
- account_name: str,
698
- share_name: str,
699
- deleted_share: Union[_models.DeletedShare, IO[bytes]],
700
- **kwargs: Any
701
- ) -> None:
702
- """Restore a file share within a valid retention days if share soft delete is enabled.
703
-
704
- :param resource_group_name: The name of the resource group within the user's subscription. The
705
- name is case insensitive. Required.
706
- :type resource_group_name: str
707
- :param account_name: The name of the storage account within the specified resource group.
708
- Storage account names must be between 3 and 24 characters in length and use numbers and
709
- lower-case letters only. Required.
710
- :type account_name: str
711
- :param share_name: The name of the file share within the specified storage account. File share
712
- names must be between 3 and 63 characters in length and use numbers, lower-case letters and
713
- dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter
714
- or number. Required.
715
- :type share_name: str
716
- :param deleted_share: Is either a DeletedShare type or a IO[bytes] type. Required.
717
- :type deleted_share: ~azure.mgmt.storage.v2019_06_01.models.DeletedShare or IO[bytes]
718
- :return: None or the result of cls(response)
719
- :rtype: None
720
- :raises ~azure.core.exceptions.HttpResponseError:
721
- """
722
- error_map: MutableMapping = {
723
- 401: ClientAuthenticationError,
724
- 404: ResourceNotFoundError,
725
- 409: ResourceExistsError,
726
- 304: ResourceNotModifiedError,
727
- }
728
- error_map.update(kwargs.pop("error_map", {}) or {})
729
-
730
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
731
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
732
-
733
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
734
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
735
- cls: ClsType[None] = kwargs.pop("cls", None)
736
-
737
- content_type = content_type or "application/json"
738
- _json = None
739
- _content = None
740
- if isinstance(deleted_share, (IOBase, bytes)):
741
- _content = deleted_share
742
- else:
743
- _json = self._serialize.body(deleted_share, "DeletedShare")
744
-
745
- _request = build_restore_request(
746
- resource_group_name=resource_group_name,
747
- account_name=account_name,
748
- share_name=share_name,
749
- subscription_id=self._config.subscription_id,
750
- api_version=api_version,
751
- content_type=content_type,
752
- json=_json,
753
- content=_content,
754
- headers=_headers,
755
- params=_params,
756
- )
757
- _request.url = self._client.format_url(_request.url)
758
-
759
- _stream = False
760
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
761
- _request, stream=_stream, **kwargs
762
- )
763
-
764
- response = pipeline_response.http_response
765
-
766
- if response.status_code not in [200]:
767
- map_error(status_code=response.status_code, response=response, error_map=error_map)
768
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
769
-
770
- if cls:
771
- return cls(pipeline_response, None, {}) # type: ignore