azure-mgmt-storage 22.2.0__py3-none-any.whl → 23.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +66 -69
  14. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_inventory_policies_operations.py +26 -34
  15. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_blob_services_operations.py +20 -22
  16. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_deleted_accounts_operations.py +14 -17
  17. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_encryption_scopes_operations.py +27 -30
  18. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_services_operations.py +24 -27
  19. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_file_shares_operations.py +36 -39
  20. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_local_users_operations.py +26 -29
  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 +16 -19
  23. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_object_replication_policies_operations.py +21 -23
  24. azure/mgmt/storage/{v2017_10_01/aio → aio}/operations/_operations.py +12 -15
  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 +21 -23
  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 +27 -30
  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 +12 -15
  31. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_accounts_operations.py +80 -95
  32. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignment_instances_report_operations.py +13 -15
  33. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_instances_report_operations.py +13 -15
  34. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_operations.py +30 -39
  35. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_table_operations.py +27 -29
  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 +12 -14
  38. azure/mgmt/storage/{v2024_01_01/models → models}/_models_py3.py +855 -910
  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 +81 -84
  42. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_inventory_policies_operations.py +31 -39
  43. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_services_operations.py +24 -27
  44. azure/mgmt/storage/{v2024_01_01/operations → operations}/_deleted_accounts_operations.py +16 -18
  45. azure/mgmt/storage/{v2024_01_01/operations → operations}/_encryption_scopes_operations.py +32 -34
  46. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_services_operations.py +30 -32
  47. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_shares_operations.py +44 -47
  48. azure/mgmt/storage/{v2024_01_01/operations → operations}/_local_users_operations.py +33 -35
  49. azure/mgmt/storage/{v2024_01_01/operations → operations}/_management_policies_operations.py +27 -34
  50. azure/mgmt/storage/{v2024_01_01/operations → operations}/_network_security_perimeter_configurations_operations.py +20 -22
  51. azure/mgmt/storage/{v2024_01_01/operations → operations}/_object_replication_policies_operations.py +26 -29
  52. azure/mgmt/storage/{v2024_01_01/operations → operations}/_operations.py +12 -15
  53. azure/mgmt/storage/operations/_patch.py +21 -0
  54. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_endpoint_connections_operations.py +26 -29
  55. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_link_resources_operations.py +13 -15
  56. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_operations.py +33 -35
  57. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_services_operations.py +23 -25
  58. azure/mgmt/storage/{v2024_01_01/operations → operations}/_skus_operations.py +12 -15
  59. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_accounts_operations.py +97 -105
  60. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignment_instances_report_operations.py +14 -18
  61. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_instances_report_operations.py +14 -18
  62. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_operations.py +36 -47
  63. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_operations.py +33 -35
  64. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_services_operations.py +23 -25
  65. azure/mgmt/storage/{v2024_01_01/operations → operations}/_usages_operations.py +13 -16
  66. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/METADATA +11 -6
  67. azure_mgmt_storage-23.0.0.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.0.dist-info}/LICENSE +0 -0
  183. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/WHEEL +0 -0
  184. {azure_mgmt_storage-22.2.0.dist-info → azure_mgmt_storage-23.0.0.dist-info}/top_level.txt +0 -0
@@ -1,597 +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, 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._queue_operations import (
31
- build_create_request,
32
- build_delete_request,
33
- build_get_request,
34
- build_list_request,
35
- build_update_request,
36
- )
37
-
38
- if sys.version_info >= (3, 9):
39
- from collections.abc import MutableMapping
40
- else:
41
- from typing import MutableMapping # type: ignore
42
- T = TypeVar("T")
43
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
44
-
45
-
46
- class QueueOperations:
47
- """
48
- .. warning::
49
- **DO NOT** instantiate this class directly.
50
-
51
- Instead, you should access the following operations through
52
- :class:`~azure.mgmt.storage.v2019_06_01.aio.StorageManagementClient`'s
53
- :attr:`queue` attribute.
54
- """
55
-
56
- models = _models
57
-
58
- def __init__(self, *args, **kwargs) -> None:
59
- 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")
65
-
66
- @overload
67
- async def create(
68
- self,
69
- resource_group_name: str,
70
- account_name: str,
71
- queue_name: str,
72
- queue: _models.StorageQueue,
73
- *,
74
- content_type: str = "application/json",
75
- **kwargs: Any
76
- ) -> _models.StorageQueue:
77
- """Creates a new queue with the specified queue name, under the specified account.
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 queue_name: A queue name must be unique within a storage account and must be between 3
87
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
88
- it should begin and end with an alphanumeric character and it cannot have two consecutive
89
- dash(-) characters. Required.
90
- :type queue_name: str
91
- :param queue: Queue properties and metadata to be created with. Required.
92
- :type queue: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
93
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
94
- Default value is "application/json".
95
- :paramtype content_type: str
96
- :return: StorageQueue or the result of cls(response)
97
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
98
- :raises ~azure.core.exceptions.HttpResponseError:
99
- """
100
-
101
- @overload
102
- async def create(
103
- self,
104
- resource_group_name: str,
105
- account_name: str,
106
- queue_name: str,
107
- queue: IO[bytes],
108
- *,
109
- content_type: str = "application/json",
110
- **kwargs: Any
111
- ) -> _models.StorageQueue:
112
- """Creates a new queue with the specified queue name, under the specified account.
113
-
114
- :param resource_group_name: The name of the resource group within the user's subscription. The
115
- name is case insensitive. Required.
116
- :type resource_group_name: str
117
- :param account_name: The name of the storage account within the specified resource group.
118
- Storage account names must be between 3 and 24 characters in length and use numbers and
119
- lower-case letters only. Required.
120
- :type account_name: str
121
- :param queue_name: A queue name must be unique within a storage account and must be between 3
122
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
123
- it should begin and end with an alphanumeric character and it cannot have two consecutive
124
- dash(-) characters. Required.
125
- :type queue_name: str
126
- :param queue: Queue properties and metadata to be created with. Required.
127
- :type queue: IO[bytes]
128
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
129
- Default value is "application/json".
130
- :paramtype content_type: str
131
- :return: StorageQueue or the result of cls(response)
132
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
133
- :raises ~azure.core.exceptions.HttpResponseError:
134
- """
135
-
136
- @distributed_trace_async
137
- async def create(
138
- self,
139
- resource_group_name: str,
140
- account_name: str,
141
- queue_name: str,
142
- queue: Union[_models.StorageQueue, IO[bytes]],
143
- **kwargs: Any
144
- ) -> _models.StorageQueue:
145
- """Creates a new queue with the specified queue name, under the specified account.
146
-
147
- :param resource_group_name: The name of the resource group within the user's subscription. The
148
- name is case insensitive. Required.
149
- :type resource_group_name: str
150
- :param account_name: The name of the storage account within the specified resource group.
151
- Storage account names must be between 3 and 24 characters in length and use numbers and
152
- lower-case letters only. Required.
153
- :type account_name: str
154
- :param queue_name: A queue name must be unique within a storage account and must be between 3
155
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
156
- it should begin and end with an alphanumeric character and it cannot have two consecutive
157
- dash(-) characters. Required.
158
- :type queue_name: str
159
- :param queue: Queue properties and metadata to be created with. Is either a StorageQueue type
160
- or a IO[bytes] type. Required.
161
- :type queue: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue or IO[bytes]
162
- :return: StorageQueue or the result of cls(response)
163
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
164
- :raises ~azure.core.exceptions.HttpResponseError:
165
- """
166
- error_map: MutableMapping = {
167
- 401: ClientAuthenticationError,
168
- 404: ResourceNotFoundError,
169
- 409: ResourceExistsError,
170
- 304: ResourceNotModifiedError,
171
- }
172
- error_map.update(kwargs.pop("error_map", {}) or {})
173
-
174
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
175
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
176
-
177
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
178
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
179
- cls: ClsType[_models.StorageQueue] = kwargs.pop("cls", None)
180
-
181
- content_type = content_type or "application/json"
182
- _json = None
183
- _content = None
184
- if isinstance(queue, (IOBase, bytes)):
185
- _content = queue
186
- else:
187
- _json = self._serialize.body(queue, "StorageQueue")
188
-
189
- _request = build_create_request(
190
- resource_group_name=resource_group_name,
191
- account_name=account_name,
192
- queue_name=queue_name,
193
- subscription_id=self._config.subscription_id,
194
- api_version=api_version,
195
- content_type=content_type,
196
- json=_json,
197
- content=_content,
198
- headers=_headers,
199
- params=_params,
200
- )
201
- _request.url = self._client.format_url(_request.url)
202
-
203
- _stream = False
204
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
205
- _request, stream=_stream, **kwargs
206
- )
207
-
208
- response = pipeline_response.http_response
209
-
210
- if response.status_code not in [200]:
211
- map_error(status_code=response.status_code, response=response, error_map=error_map)
212
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
213
-
214
- deserialized = self._deserialize("StorageQueue", pipeline_response.http_response)
215
-
216
- if cls:
217
- return cls(pipeline_response, deserialized, {}) # type: ignore
218
-
219
- return deserialized # type: ignore
220
-
221
- @overload
222
- async def update(
223
- self,
224
- resource_group_name: str,
225
- account_name: str,
226
- queue_name: str,
227
- queue: _models.StorageQueue,
228
- *,
229
- content_type: str = "application/json",
230
- **kwargs: Any
231
- ) -> _models.StorageQueue:
232
- """Creates a new queue with the specified queue name, under the specified account.
233
-
234
- :param resource_group_name: The name of the resource group within the user's subscription. The
235
- name is case insensitive. Required.
236
- :type resource_group_name: str
237
- :param account_name: The name of the storage account within the specified resource group.
238
- Storage account names must be between 3 and 24 characters in length and use numbers and
239
- lower-case letters only. Required.
240
- :type account_name: str
241
- :param queue_name: A queue name must be unique within a storage account and must be between 3
242
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
243
- it should begin and end with an alphanumeric character and it cannot have two consecutive
244
- dash(-) characters. Required.
245
- :type queue_name: str
246
- :param queue: Queue properties and metadata to be created with. Required.
247
- :type queue: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
248
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
249
- Default value is "application/json".
250
- :paramtype content_type: str
251
- :return: StorageQueue or the result of cls(response)
252
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
253
- :raises ~azure.core.exceptions.HttpResponseError:
254
- """
255
-
256
- @overload
257
- async def update(
258
- self,
259
- resource_group_name: str,
260
- account_name: str,
261
- queue_name: str,
262
- queue: IO[bytes],
263
- *,
264
- content_type: str = "application/json",
265
- **kwargs: Any
266
- ) -> _models.StorageQueue:
267
- """Creates a new queue with the specified queue name, under the specified account.
268
-
269
- :param resource_group_name: The name of the resource group within the user's subscription. The
270
- name is case insensitive. Required.
271
- :type resource_group_name: str
272
- :param account_name: The name of the storage account within the specified resource group.
273
- Storage account names must be between 3 and 24 characters in length and use numbers and
274
- lower-case letters only. Required.
275
- :type account_name: str
276
- :param queue_name: A queue name must be unique within a storage account and must be between 3
277
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
278
- it should begin and end with an alphanumeric character and it cannot have two consecutive
279
- dash(-) characters. Required.
280
- :type queue_name: str
281
- :param queue: Queue properties and metadata to be created with. Required.
282
- :type queue: IO[bytes]
283
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
284
- Default value is "application/json".
285
- :paramtype content_type: str
286
- :return: StorageQueue or the result of cls(response)
287
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
288
- :raises ~azure.core.exceptions.HttpResponseError:
289
- """
290
-
291
- @distributed_trace_async
292
- async def update(
293
- self,
294
- resource_group_name: str,
295
- account_name: str,
296
- queue_name: str,
297
- queue: Union[_models.StorageQueue, IO[bytes]],
298
- **kwargs: Any
299
- ) -> _models.StorageQueue:
300
- """Creates a new queue with the specified queue name, under the specified account.
301
-
302
- :param resource_group_name: The name of the resource group within the user's subscription. The
303
- name is case insensitive. Required.
304
- :type resource_group_name: str
305
- :param account_name: The name of the storage account within the specified resource group.
306
- Storage account names must be between 3 and 24 characters in length and use numbers and
307
- lower-case letters only. Required.
308
- :type account_name: str
309
- :param queue_name: A queue name must be unique within a storage account and must be between 3
310
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
311
- it should begin and end with an alphanumeric character and it cannot have two consecutive
312
- dash(-) characters. Required.
313
- :type queue_name: str
314
- :param queue: Queue properties and metadata to be created with. Is either a StorageQueue type
315
- or a IO[bytes] type. Required.
316
- :type queue: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue or IO[bytes]
317
- :return: StorageQueue or the result of cls(response)
318
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
319
- :raises ~azure.core.exceptions.HttpResponseError:
320
- """
321
- error_map: MutableMapping = {
322
- 401: ClientAuthenticationError,
323
- 404: ResourceNotFoundError,
324
- 409: ResourceExistsError,
325
- 304: ResourceNotModifiedError,
326
- }
327
- error_map.update(kwargs.pop("error_map", {}) or {})
328
-
329
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
330
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
331
-
332
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
333
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
334
- cls: ClsType[_models.StorageQueue] = kwargs.pop("cls", None)
335
-
336
- content_type = content_type or "application/json"
337
- _json = None
338
- _content = None
339
- if isinstance(queue, (IOBase, bytes)):
340
- _content = queue
341
- else:
342
- _json = self._serialize.body(queue, "StorageQueue")
343
-
344
- _request = build_update_request(
345
- resource_group_name=resource_group_name,
346
- account_name=account_name,
347
- queue_name=queue_name,
348
- subscription_id=self._config.subscription_id,
349
- api_version=api_version,
350
- content_type=content_type,
351
- json=_json,
352
- content=_content,
353
- headers=_headers,
354
- params=_params,
355
- )
356
- _request.url = self._client.format_url(_request.url)
357
-
358
- _stream = False
359
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
360
- _request, stream=_stream, **kwargs
361
- )
362
-
363
- response = pipeline_response.http_response
364
-
365
- if response.status_code not in [200]:
366
- map_error(status_code=response.status_code, response=response, error_map=error_map)
367
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
368
-
369
- deserialized = self._deserialize("StorageQueue", pipeline_response.http_response)
370
-
371
- if cls:
372
- return cls(pipeline_response, deserialized, {}) # type: ignore
373
-
374
- return deserialized # type: ignore
375
-
376
- @distributed_trace_async
377
- async def get(
378
- self, resource_group_name: str, account_name: str, queue_name: str, **kwargs: Any
379
- ) -> _models.StorageQueue:
380
- """Gets the queue with the specified queue name, under the specified account if it exists.
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 queue_name: A queue name must be unique within a storage account and must be between 3
390
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
391
- it should begin and end with an alphanumeric character and it cannot have two consecutive
392
- dash(-) characters. Required.
393
- :type queue_name: str
394
- :return: StorageQueue or the result of cls(response)
395
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.StorageQueue
396
- :raises ~azure.core.exceptions.HttpResponseError:
397
- """
398
- error_map: MutableMapping = {
399
- 401: ClientAuthenticationError,
400
- 404: ResourceNotFoundError,
401
- 409: ResourceExistsError,
402
- 304: ResourceNotModifiedError,
403
- }
404
- error_map.update(kwargs.pop("error_map", {}) or {})
405
-
406
- _headers = kwargs.pop("headers", {}) or {}
407
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
408
-
409
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
410
- cls: ClsType[_models.StorageQueue] = kwargs.pop("cls", None)
411
-
412
- _request = build_get_request(
413
- resource_group_name=resource_group_name,
414
- account_name=account_name,
415
- queue_name=queue_name,
416
- subscription_id=self._config.subscription_id,
417
- api_version=api_version,
418
- headers=_headers,
419
- params=_params,
420
- )
421
- _request.url = self._client.format_url(_request.url)
422
-
423
- _stream = False
424
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
425
- _request, stream=_stream, **kwargs
426
- )
427
-
428
- response = pipeline_response.http_response
429
-
430
- if response.status_code not in [200]:
431
- map_error(status_code=response.status_code, response=response, error_map=error_map)
432
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
433
-
434
- deserialized = self._deserialize("StorageQueue", pipeline_response.http_response)
435
-
436
- if cls:
437
- return cls(pipeline_response, deserialized, {}) # type: ignore
438
-
439
- return deserialized # type: ignore
440
-
441
- @distributed_trace_async
442
- async def delete(self, resource_group_name: str, account_name: str, queue_name: str, **kwargs: Any) -> None:
443
- """Deletes the queue with the specified queue name, under the specified account if it exists.
444
-
445
- :param resource_group_name: The name of the resource group within the user's subscription. The
446
- name is case insensitive. Required.
447
- :type resource_group_name: str
448
- :param account_name: The name of the storage account within the specified resource group.
449
- Storage account names must be between 3 and 24 characters in length and use numbers and
450
- lower-case letters only. Required.
451
- :type account_name: str
452
- :param queue_name: A queue name must be unique within a storage account and must be between 3
453
- and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only,
454
- it should begin and end with an alphanumeric character and it cannot have two consecutive
455
- dash(-) characters. Required.
456
- :type queue_name: str
457
- :return: None or the result of cls(response)
458
- :rtype: None
459
- :raises ~azure.core.exceptions.HttpResponseError:
460
- """
461
- error_map: MutableMapping = {
462
- 401: ClientAuthenticationError,
463
- 404: ResourceNotFoundError,
464
- 409: ResourceExistsError,
465
- 304: ResourceNotModifiedError,
466
- }
467
- error_map.update(kwargs.pop("error_map", {}) or {})
468
-
469
- _headers = kwargs.pop("headers", {}) or {}
470
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
471
-
472
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
473
- cls: ClsType[None] = kwargs.pop("cls", None)
474
-
475
- _request = build_delete_request(
476
- resource_group_name=resource_group_name,
477
- account_name=account_name,
478
- queue_name=queue_name,
479
- subscription_id=self._config.subscription_id,
480
- api_version=api_version,
481
- headers=_headers,
482
- params=_params,
483
- )
484
- _request.url = self._client.format_url(_request.url)
485
-
486
- _stream = False
487
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
488
- _request, stream=_stream, **kwargs
489
- )
490
-
491
- response = pipeline_response.http_response
492
-
493
- if response.status_code not in [204]:
494
- map_error(status_code=response.status_code, response=response, error_map=error_map)
495
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
496
-
497
- if cls:
498
- return cls(pipeline_response, None, {}) # type: ignore
499
-
500
- @distributed_trace
501
- def list(
502
- self,
503
- resource_group_name: str,
504
- account_name: str,
505
- maxpagesize: Optional[str] = None,
506
- filter: Optional[str] = None,
507
- **kwargs: Any
508
- ) -> AsyncIterable["_models.ListQueue"]:
509
- """Gets a list of all the queues under the specified storage account.
510
-
511
- :param resource_group_name: The name of the resource group within the user's subscription. The
512
- name is case insensitive. Required.
513
- :type resource_group_name: str
514
- :param account_name: The name of the storage account within the specified resource group.
515
- Storage account names must be between 3 and 24 characters in length and use numbers and
516
- lower-case letters only. Required.
517
- :type account_name: str
518
- :param maxpagesize: Optional, a maximum number of queues that should be included in a list
519
- queue response. Default value is None.
520
- :type maxpagesize: str
521
- :param filter: Optional, When specified, only the queues with a name starting with the given
522
- filter will be listed. Default value is None.
523
- :type filter: str
524
- :return: An iterator like instance of either ListQueue or the result of cls(response)
525
- :rtype:
526
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2019_06_01.models.ListQueue]
527
- :raises ~azure.core.exceptions.HttpResponseError:
528
- """
529
- _headers = kwargs.pop("headers", {}) or {}
530
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
531
-
532
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
533
- cls: ClsType[_models.ListQueueResource] = kwargs.pop("cls", None)
534
-
535
- error_map: MutableMapping = {
536
- 401: ClientAuthenticationError,
537
- 404: ResourceNotFoundError,
538
- 409: ResourceExistsError,
539
- 304: ResourceNotModifiedError,
540
- }
541
- error_map.update(kwargs.pop("error_map", {}) or {})
542
-
543
- def prepare_request(next_link=None):
544
- if not next_link:
545
-
546
- _request = build_list_request(
547
- resource_group_name=resource_group_name,
548
- account_name=account_name,
549
- subscription_id=self._config.subscription_id,
550
- maxpagesize=maxpagesize,
551
- filter=filter,
552
- api_version=api_version,
553
- headers=_headers,
554
- params=_params,
555
- )
556
- _request.url = self._client.format_url(_request.url)
557
-
558
- else:
559
- # make call to next link with the client's api-version
560
- _parsed_next_link = urllib.parse.urlparse(next_link)
561
- _next_request_params = case_insensitive_dict(
562
- {
563
- key: [urllib.parse.quote(v) for v in value]
564
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
565
- }
566
- )
567
- _next_request_params["api-version"] = self._api_version
568
- _request = HttpRequest(
569
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
570
- )
571
- _request.url = self._client.format_url(_request.url)
572
- _request.method = "GET"
573
- return _request
574
-
575
- async def extract_data(pipeline_response):
576
- deserialized = self._deserialize("ListQueueResource", pipeline_response)
577
- list_of_elem = deserialized.value
578
- if cls:
579
- list_of_elem = cls(list_of_elem) # type: ignore
580
- return deserialized.next_link or None, AsyncList(list_of_elem)
581
-
582
- async def get_next(next_link=None):
583
- _request = prepare_request(next_link)
584
-
585
- _stream = False
586
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
587
- _request, stream=_stream, **kwargs
588
- )
589
- response = pipeline_response.http_response
590
-
591
- if response.status_code not in [200]:
592
- map_error(status_code=response.status_code, response=response, error_map=error_map)
593
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
594
-
595
- return pipeline_response
596
-
597
- return AsyncItemPaged(get_next, extract_data)