azure-mgmt-storage 22.1.1__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 +81 -96
  32. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignment_instances_report_operations.py +14 -16
  33. azure/mgmt/storage/{v2024_01_01/aio → aio}/operations/_storage_task_assignments_instances_report_operations.py +14 -16
  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 +870 -927
  39. azure/mgmt/storage/{v2016_01_01/operations → models}/_patch.py +5 -4
  40. azure/mgmt/storage/{v2024_01_01/models → models}/_storage_management_client_enums.py +1 -0
  41. azure/mgmt/storage/{v2024_01_01/operations → operations}/__init__.py +1 -0
  42. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_containers_operations.py +81 -84
  43. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_inventory_policies_operations.py +31 -39
  44. azure/mgmt/storage/{v2024_01_01/operations → operations}/_blob_services_operations.py +24 -27
  45. azure/mgmt/storage/{v2024_01_01/operations → operations}/_deleted_accounts_operations.py +16 -18
  46. azure/mgmt/storage/{v2024_01_01/operations → operations}/_encryption_scopes_operations.py +32 -34
  47. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_services_operations.py +30 -32
  48. azure/mgmt/storage/{v2024_01_01/operations → operations}/_file_shares_operations.py +44 -47
  49. azure/mgmt/storage/{v2024_01_01/operations → operations}/_local_users_operations.py +33 -35
  50. azure/mgmt/storage/{v2024_01_01/operations → operations}/_management_policies_operations.py +27 -34
  51. azure/mgmt/storage/{v2024_01_01/operations → operations}/_network_security_perimeter_configurations_operations.py +20 -22
  52. azure/mgmt/storage/{v2024_01_01/operations → operations}/_object_replication_policies_operations.py +26 -29
  53. azure/mgmt/storage/{v2024_01_01/operations → operations}/_operations.py +12 -15
  54. azure/mgmt/storage/operations/_patch.py +21 -0
  55. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_endpoint_connections_operations.py +26 -29
  56. azure/mgmt/storage/{v2024_01_01/operations → operations}/_private_link_resources_operations.py +13 -15
  57. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_operations.py +33 -35
  58. azure/mgmt/storage/{v2024_01_01/operations → operations}/_queue_services_operations.py +23 -25
  59. azure/mgmt/storage/{v2024_01_01/operations → operations}/_skus_operations.py +12 -15
  60. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_accounts_operations.py +98 -106
  61. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignment_instances_report_operations.py +15 -19
  62. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_instances_report_operations.py +15 -19
  63. azure/mgmt/storage/{v2024_01_01/operations → operations}/_storage_task_assignments_operations.py +36 -47
  64. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_operations.py +33 -35
  65. azure/mgmt/storage/{v2024_01_01/operations → operations}/_table_services_operations.py +23 -25
  66. azure/mgmt/storage/{v2024_01_01/operations → operations}/_usages_operations.py +13 -16
  67. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/METADATA +20 -10
  68. azure_mgmt_storage-23.0.0.dist-info/RECORD +73 -0
  69. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/WHEEL +1 -1
  70. azure/mgmt/storage/models.py +0 -8
  71. azure/mgmt/storage/v2016_01_01/__init__.py +0 -32
  72. azure/mgmt/storage/v2016_01_01/_configuration.py +0 -65
  73. azure/mgmt/storage/v2016_01_01/_patch.py +0 -32
  74. azure/mgmt/storage/v2016_01_01/_storage_management_client.py +0 -117
  75. azure/mgmt/storage/v2016_01_01/aio/__init__.py +0 -29
  76. azure/mgmt/storage/v2016_01_01/aio/_configuration.py +0 -65
  77. azure/mgmt/storage/v2016_01_01/aio/_patch.py +0 -32
  78. azure/mgmt/storage/v2016_01_01/aio/_storage_management_client.py +0 -120
  79. azure/mgmt/storage/v2016_01_01/aio/operations/__init__.py +0 -27
  80. azure/mgmt/storage/v2016_01_01/aio/operations/_storage_accounts_operations.py +0 -1023
  81. azure/mgmt/storage/v2016_01_01/aio/operations/_usage_operations.py +0 -130
  82. azure/mgmt/storage/v2016_01_01/models/__init__.py +0 -88
  83. azure/mgmt/storage/v2016_01_01/models/_models_py3.py +0 -829
  84. azure/mgmt/storage/v2016_01_01/models/_storage_management_client_enums.py +0 -99
  85. azure/mgmt/storage/v2016_01_01/operations/__init__.py +0 -27
  86. azure/mgmt/storage/v2016_01_01/operations/_storage_accounts_operations.py +0 -1278
  87. azure/mgmt/storage/v2016_01_01/operations/_usage_operations.py +0 -157
  88. azure/mgmt/storage/v2016_01_01/py.typed +0 -1
  89. azure/mgmt/storage/v2017_10_01/__init__.py +0 -32
  90. azure/mgmt/storage/v2017_10_01/_configuration.py +0 -65
  91. azure/mgmt/storage/v2017_10_01/_patch.py +0 -32
  92. azure/mgmt/storage/v2017_10_01/_storage_management.py +0 -121
  93. azure/mgmt/storage/v2017_10_01/_version.py +0 -9
  94. azure/mgmt/storage/v2017_10_01/aio/__init__.py +0 -29
  95. azure/mgmt/storage/v2017_10_01/aio/_configuration.py +0 -65
  96. azure/mgmt/storage/v2017_10_01/aio/_patch.py +0 -32
  97. azure/mgmt/storage/v2017_10_01/aio/_storage_management.py +0 -124
  98. azure/mgmt/storage/v2017_10_01/aio/operations/__init__.py +0 -31
  99. azure/mgmt/storage/v2017_10_01/aio/operations/_skus_operations.py +0 -130
  100. azure/mgmt/storage/v2017_10_01/aio/operations/_storage_accounts_operations.py +0 -1299
  101. azure/mgmt/storage/v2017_10_01/aio/operations/_usage_operations.py +0 -130
  102. azure/mgmt/storage/v2017_10_01/models/__init__.py +0 -140
  103. azure/mgmt/storage/v2017_10_01/models/_models_py3.py +0 -1851
  104. azure/mgmt/storage/v2017_10_01/models/_patch.py +0 -20
  105. azure/mgmt/storage/v2017_10_01/models/_storage_management_enums.py +0 -192
  106. azure/mgmt/storage/v2017_10_01/operations/__init__.py +0 -31
  107. azure/mgmt/storage/v2017_10_01/operations/_operations.py +0 -151
  108. azure/mgmt/storage/v2017_10_01/operations/_patch.py +0 -20
  109. azure/mgmt/storage/v2017_10_01/operations/_skus_operations.py +0 -157
  110. azure/mgmt/storage/v2017_10_01/operations/_storage_accounts_operations.py +0 -1638
  111. azure/mgmt/storage/v2017_10_01/operations/_usage_operations.py +0 -157
  112. azure/mgmt/storage/v2017_10_01/py.typed +0 -1
  113. azure/mgmt/storage/v2019_06_01/__init__.py +0 -32
  114. azure/mgmt/storage/v2019_06_01/_configuration.py +0 -64
  115. azure/mgmt/storage/v2019_06_01/_patch.py +0 -32
  116. azure/mgmt/storage/v2019_06_01/_storage_management_client.py +0 -213
  117. azure/mgmt/storage/v2019_06_01/_version.py +0 -9
  118. azure/mgmt/storage/v2019_06_01/aio/__init__.py +0 -29
  119. azure/mgmt/storage/v2019_06_01/aio/_configuration.py +0 -64
  120. azure/mgmt/storage/v2019_06_01/aio/_patch.py +0 -32
  121. azure/mgmt/storage/v2019_06_01/aio/_storage_management_client.py +0 -217
  122. azure/mgmt/storage/v2019_06_01/aio/operations/__init__.py +0 -59
  123. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_containers_operations.py +0 -1725
  124. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_inventory_policies_operations.py +0 -437
  125. azure/mgmt/storage/v2019_06_01/aio/operations/_blob_services_operations.py +0 -368
  126. azure/mgmt/storage/v2019_06_01/aio/operations/_encryption_scopes_operations.py +0 -538
  127. azure/mgmt/storage/v2019_06_01/aio/operations/_file_services_operations.py +0 -335
  128. azure/mgmt/storage/v2019_06_01/aio/operations/_file_shares_operations.py +0 -771
  129. azure/mgmt/storage/v2019_06_01/aio/operations/_object_replication_policies_operations.py +0 -428
  130. azure/mgmt/storage/v2019_06_01/aio/operations/_operations.py +0 -130
  131. azure/mgmt/storage/v2019_06_01/aio/operations/_patch.py +0 -20
  132. azure/mgmt/storage/v2019_06_01/aio/operations/_private_endpoint_connections_operations.py +0 -424
  133. azure/mgmt/storage/v2019_06_01/aio/operations/_private_link_resources_operations.py +0 -113
  134. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_operations.py +0 -597
  135. azure/mgmt/storage/v2019_06_01/aio/operations/_queue_services_operations.py +0 -335
  136. azure/mgmt/storage/v2019_06_01/aio/operations/_skus_operations.py +0 -131
  137. azure/mgmt/storage/v2019_06_01/aio/operations/_storage_accounts_operations.py +0 -1696
  138. azure/mgmt/storage/v2019_06_01/aio/operations/_table_operations.py +0 -394
  139. azure/mgmt/storage/v2019_06_01/aio/operations/_table_services_operations.py +0 -335
  140. azure/mgmt/storage/v2019_06_01/aio/operations/_usages_operations.py +0 -134
  141. azure/mgmt/storage/v2019_06_01/models/__init__.py +0 -364
  142. azure/mgmt/storage/v2019_06_01/models/_models_py3.py +0 -6038
  143. azure/mgmt/storage/v2019_06_01/models/_patch.py +0 -20
  144. azure/mgmt/storage/v2019_06_01/models/_storage_management_client_enums.py +0 -456
  145. azure/mgmt/storage/v2019_06_01/operations/__init__.py +0 -59
  146. azure/mgmt/storage/v2019_06_01/operations/_blob_containers_operations.py +0 -2226
  147. azure/mgmt/storage/v2019_06_01/operations/_blob_inventory_policies_operations.py +0 -582
  148. azure/mgmt/storage/v2019_06_01/operations/_blob_services_operations.py +0 -476
  149. azure/mgmt/storage/v2019_06_01/operations/_encryption_scopes_operations.py +0 -677
  150. azure/mgmt/storage/v2019_06_01/operations/_file_services_operations.py +0 -444
  151. azure/mgmt/storage/v2019_06_01/operations/_file_shares_operations.py +0 -1000
  152. azure/mgmt/storage/v2019_06_01/operations/_management_policies_operations.py +0 -453
  153. azure/mgmt/storage/v2019_06_01/operations/_object_replication_policies_operations.py +0 -567
  154. azure/mgmt/storage/v2019_06_01/operations/_operations.py +0 -151
  155. azure/mgmt/storage/v2019_06_01/operations/_patch.py +0 -20
  156. azure/mgmt/storage/v2019_06_01/operations/_private_endpoint_connections_operations.py +0 -575
  157. azure/mgmt/storage/v2019_06_01/operations/_private_link_resources_operations.py +0 -149
  158. azure/mgmt/storage/v2019_06_01/operations/_queue_operations.py +0 -805
  159. azure/mgmt/storage/v2019_06_01/operations/_queue_services_operations.py +0 -444
  160. azure/mgmt/storage/v2019_06_01/operations/_skus_operations.py +0 -157
  161. azure/mgmt/storage/v2019_06_01/operations/_storage_accounts_operations.py +0 -2122
  162. azure/mgmt/storage/v2019_06_01/operations/_table_operations.py +0 -563
  163. azure/mgmt/storage/v2019_06_01/operations/_table_services_operations.py +0 -444
  164. azure/mgmt/storage/v2019_06_01/operations/_usages_operations.py +0 -164
  165. azure/mgmt/storage/v2019_06_01/py.typed +0 -1
  166. azure/mgmt/storage/v2024_01_01/__init__.py +0 -32
  167. azure/mgmt/storage/v2024_01_01/_configuration.py +0 -64
  168. azure/mgmt/storage/v2024_01_01/_patch.py +0 -20
  169. azure/mgmt/storage/v2024_01_01/_storage_management_client.py +0 -256
  170. azure/mgmt/storage/v2024_01_01/_version.py +0 -9
  171. azure/mgmt/storage/v2024_01_01/aio/__init__.py +0 -29
  172. azure/mgmt/storage/v2024_01_01/aio/_configuration.py +0 -64
  173. azure/mgmt/storage/v2024_01_01/aio/_patch.py +0 -20
  174. azure/mgmt/storage/v2024_01_01/aio/_storage_management_client.py +0 -261
  175. azure/mgmt/storage/v2024_01_01/aio/operations/_management_policies_operations.py +0 -343
  176. azure/mgmt/storage/v2024_01_01/aio/operations/_operations.py +0 -130
  177. azure/mgmt/storage/v2024_01_01/aio/operations/_patch.py +0 -20
  178. azure/mgmt/storage/v2024_01_01/models/_patch.py +0 -20
  179. azure/mgmt/storage/v2024_01_01/operations/_patch.py +0 -20
  180. azure/mgmt/storage/v2024_01_01/py.typed +0 -1
  181. azure_mgmt_storage-22.1.1.dist-info/RECORD +0 -183
  182. /azure/mgmt/storage/{v2024_01_01/models → models}/__init__.py +0 -0
  183. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/LICENSE +0 -0
  184. {azure_mgmt_storage-22.1.1.dist-info → azure_mgmt_storage-23.0.0.dist-info}/top_level.txt +0 -0
@@ -1,368 +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._blob_services_operations import (
31
- build_get_service_properties_request,
32
- build_list_request,
33
- build_set_service_properties_request,
34
- )
35
-
36
- if sys.version_info >= (3, 9):
37
- from collections.abc import MutableMapping
38
- else:
39
- from typing import MutableMapping # type: ignore
40
- T = TypeVar("T")
41
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
42
-
43
-
44
- class BlobServicesOperations:
45
- """
46
- .. warning::
47
- **DO NOT** instantiate this class directly.
48
-
49
- Instead, you should access the following operations through
50
- :class:`~azure.mgmt.storage.v2019_06_01.aio.StorageManagementClient`'s
51
- :attr:`blob_services` attribute.
52
- """
53
-
54
- models = _models
55
-
56
- def __init__(self, *args, **kwargs) -> None:
57
- input_args = list(args)
58
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
59
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
60
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
61
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
62
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
63
-
64
- @distributed_trace
65
- def list(
66
- self, resource_group_name: str, account_name: str, **kwargs: Any
67
- ) -> AsyncIterable["_models.BlobServiceProperties"]:
68
- """List blob services of storage account. It returns a collection of one object named default.
69
-
70
- :param resource_group_name: The name of the resource group within the user's subscription. The
71
- name is case insensitive. Required.
72
- :type resource_group_name: str
73
- :param account_name: The name of the storage account within the specified resource group.
74
- Storage account names must be between 3 and 24 characters in length and use numbers and
75
- lower-case letters only. Required.
76
- :type account_name: str
77
- :return: An iterator like instance of either BlobServiceProperties or the result of
78
- cls(response)
79
- :rtype:
80
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties]
81
- :raises ~azure.core.exceptions.HttpResponseError:
82
- """
83
- _headers = kwargs.pop("headers", {}) or {}
84
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
85
-
86
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
87
- cls: ClsType[_models.BlobServiceItems] = kwargs.pop("cls", None)
88
-
89
- error_map: MutableMapping = {
90
- 401: ClientAuthenticationError,
91
- 404: ResourceNotFoundError,
92
- 409: ResourceExistsError,
93
- 304: ResourceNotModifiedError,
94
- }
95
- error_map.update(kwargs.pop("error_map", {}) or {})
96
-
97
- def prepare_request(next_link=None):
98
- if not next_link:
99
-
100
- _request = build_list_request(
101
- resource_group_name=resource_group_name,
102
- account_name=account_name,
103
- subscription_id=self._config.subscription_id,
104
- api_version=api_version,
105
- headers=_headers,
106
- params=_params,
107
- )
108
- _request.url = self._client.format_url(_request.url)
109
-
110
- else:
111
- # make call to next link with the client's api-version
112
- _parsed_next_link = urllib.parse.urlparse(next_link)
113
- _next_request_params = case_insensitive_dict(
114
- {
115
- key: [urllib.parse.quote(v) for v in value]
116
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
117
- }
118
- )
119
- _next_request_params["api-version"] = self._api_version
120
- _request = HttpRequest(
121
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
122
- )
123
- _request.url = self._client.format_url(_request.url)
124
- _request.method = "GET"
125
- return _request
126
-
127
- async def extract_data(pipeline_response):
128
- deserialized = self._deserialize("BlobServiceItems", pipeline_response)
129
- list_of_elem = deserialized.value
130
- if cls:
131
- list_of_elem = cls(list_of_elem) # type: ignore
132
- return None, AsyncList(list_of_elem)
133
-
134
- async def get_next(next_link=None):
135
- _request = prepare_request(next_link)
136
-
137
- _stream = False
138
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
139
- _request, stream=_stream, **kwargs
140
- )
141
- response = pipeline_response.http_response
142
-
143
- if response.status_code not in [200]:
144
- map_error(status_code=response.status_code, response=response, error_map=error_map)
145
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
146
-
147
- return pipeline_response
148
-
149
- return AsyncItemPaged(get_next, extract_data)
150
-
151
- @overload
152
- async def set_service_properties(
153
- self,
154
- resource_group_name: str,
155
- account_name: str,
156
- blob_services_name: Union[str, _models.Enum27],
157
- parameters: _models.BlobServiceProperties,
158
- *,
159
- content_type: str = "application/json",
160
- **kwargs: Any
161
- ) -> _models.BlobServiceProperties:
162
- """Sets the properties of a storage account’s Blob service, including properties for Storage
163
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
164
-
165
- :param resource_group_name: The name of the resource group within the user's subscription. The
166
- name is case insensitive. Required.
167
- :type resource_group_name: str
168
- :param account_name: The name of the storage account within the specified resource group.
169
- Storage account names must be between 3 and 24 characters in length and use numbers and
170
- lower-case letters only. Required.
171
- :type account_name: str
172
- :param blob_services_name: The name of the blob Service within the specified storage account.
173
- Blob Service Name must be 'default'. "default" Required.
174
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
175
- :param parameters: The properties of a storage account’s Blob service, including properties for
176
- Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. Required.
177
- :type parameters: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
178
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
179
- Default value is "application/json".
180
- :paramtype content_type: str
181
- :return: BlobServiceProperties or the result of cls(response)
182
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
183
- :raises ~azure.core.exceptions.HttpResponseError:
184
- """
185
-
186
- @overload
187
- async def set_service_properties(
188
- self,
189
- resource_group_name: str,
190
- account_name: str,
191
- blob_services_name: Union[str, _models.Enum27],
192
- parameters: IO[bytes],
193
- *,
194
- content_type: str = "application/json",
195
- **kwargs: Any
196
- ) -> _models.BlobServiceProperties:
197
- """Sets the properties of a storage account’s Blob service, including properties for Storage
198
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
199
-
200
- :param resource_group_name: The name of the resource group within the user's subscription. The
201
- name is case insensitive. Required.
202
- :type resource_group_name: str
203
- :param account_name: The name of the storage account within the specified resource group.
204
- Storage account names must be between 3 and 24 characters in length and use numbers and
205
- lower-case letters only. Required.
206
- :type account_name: str
207
- :param blob_services_name: The name of the blob Service within the specified storage account.
208
- Blob Service Name must be 'default'. "default" Required.
209
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
210
- :param parameters: The properties of a storage account’s Blob service, including properties for
211
- Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. Required.
212
- :type parameters: IO[bytes]
213
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
214
- Default value is "application/json".
215
- :paramtype content_type: str
216
- :return: BlobServiceProperties or the result of cls(response)
217
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
218
- :raises ~azure.core.exceptions.HttpResponseError:
219
- """
220
-
221
- @distributed_trace_async
222
- async def set_service_properties(
223
- self,
224
- resource_group_name: str,
225
- account_name: str,
226
- blob_services_name: Union[str, _models.Enum27],
227
- parameters: Union[_models.BlobServiceProperties, IO[bytes]],
228
- **kwargs: Any
229
- ) -> _models.BlobServiceProperties:
230
- """Sets the properties of a storage account’s Blob service, including properties for Storage
231
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
232
-
233
- :param resource_group_name: The name of the resource group within the user's subscription. The
234
- name is case insensitive. Required.
235
- :type resource_group_name: str
236
- :param account_name: The name of the storage account within the specified resource group.
237
- Storage account names must be between 3 and 24 characters in length and use numbers and
238
- lower-case letters only. Required.
239
- :type account_name: str
240
- :param blob_services_name: The name of the blob Service within the specified storage account.
241
- Blob Service Name must be 'default'. "default" Required.
242
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
243
- :param parameters: The properties of a storage account’s Blob service, including properties for
244
- Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. Is either a
245
- BlobServiceProperties type or a IO[bytes] type. Required.
246
- :type parameters: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties or IO[bytes]
247
- :return: BlobServiceProperties or the result of cls(response)
248
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
249
- :raises ~azure.core.exceptions.HttpResponseError:
250
- """
251
- error_map: MutableMapping = {
252
- 401: ClientAuthenticationError,
253
- 404: ResourceNotFoundError,
254
- 409: ResourceExistsError,
255
- 304: ResourceNotModifiedError,
256
- }
257
- error_map.update(kwargs.pop("error_map", {}) or {})
258
-
259
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
260
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
261
-
262
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
263
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
264
- cls: ClsType[_models.BlobServiceProperties] = kwargs.pop("cls", None)
265
-
266
- content_type = content_type or "application/json"
267
- _json = None
268
- _content = None
269
- if isinstance(parameters, (IOBase, bytes)):
270
- _content = parameters
271
- else:
272
- _json = self._serialize.body(parameters, "BlobServiceProperties")
273
-
274
- _request = build_set_service_properties_request(
275
- resource_group_name=resource_group_name,
276
- account_name=account_name,
277
- blob_services_name=blob_services_name,
278
- subscription_id=self._config.subscription_id,
279
- api_version=api_version,
280
- content_type=content_type,
281
- json=_json,
282
- content=_content,
283
- headers=_headers,
284
- params=_params,
285
- )
286
- _request.url = self._client.format_url(_request.url)
287
-
288
- _stream = False
289
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
290
- _request, stream=_stream, **kwargs
291
- )
292
-
293
- response = pipeline_response.http_response
294
-
295
- if response.status_code not in [200]:
296
- map_error(status_code=response.status_code, response=response, error_map=error_map)
297
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
298
-
299
- deserialized = self._deserialize("BlobServiceProperties", pipeline_response.http_response)
300
-
301
- if cls:
302
- return cls(pipeline_response, deserialized, {}) # type: ignore
303
-
304
- return deserialized # type: ignore
305
-
306
- @distributed_trace_async
307
- async def get_service_properties(
308
- self, resource_group_name: str, account_name: str, blob_services_name: Union[str, _models.Enum27], **kwargs: Any
309
- ) -> _models.BlobServiceProperties:
310
- """Gets the properties of a storage account’s Blob service, including properties for Storage
311
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
312
-
313
- :param resource_group_name: The name of the resource group within the user's subscription. The
314
- name is case insensitive. Required.
315
- :type resource_group_name: str
316
- :param account_name: The name of the storage account within the specified resource group.
317
- Storage account names must be between 3 and 24 characters in length and use numbers and
318
- lower-case letters only. Required.
319
- :type account_name: str
320
- :param blob_services_name: The name of the blob Service within the specified storage account.
321
- Blob Service Name must be 'default'. "default" Required.
322
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
323
- :return: BlobServiceProperties or the result of cls(response)
324
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
325
- :raises ~azure.core.exceptions.HttpResponseError:
326
- """
327
- error_map: MutableMapping = {
328
- 401: ClientAuthenticationError,
329
- 404: ResourceNotFoundError,
330
- 409: ResourceExistsError,
331
- 304: ResourceNotModifiedError,
332
- }
333
- error_map.update(kwargs.pop("error_map", {}) or {})
334
-
335
- _headers = kwargs.pop("headers", {}) or {}
336
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
337
-
338
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
339
- cls: ClsType[_models.BlobServiceProperties] = kwargs.pop("cls", None)
340
-
341
- _request = build_get_service_properties_request(
342
- resource_group_name=resource_group_name,
343
- account_name=account_name,
344
- blob_services_name=blob_services_name,
345
- subscription_id=self._config.subscription_id,
346
- api_version=api_version,
347
- headers=_headers,
348
- params=_params,
349
- )
350
- _request.url = self._client.format_url(_request.url)
351
-
352
- _stream = False
353
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
354
- _request, stream=_stream, **kwargs
355
- )
356
-
357
- response = pipeline_response.http_response
358
-
359
- if response.status_code not in [200]:
360
- map_error(status_code=response.status_code, response=response, error_map=error_map)
361
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
362
-
363
- deserialized = self._deserialize("BlobServiceProperties", pipeline_response.http_response)
364
-
365
- if cls:
366
- return cls(pipeline_response, deserialized, {}) # type: ignore
367
-
368
- return deserialized # type: ignore