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,476 +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, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
11
- import urllib.parse
12
-
13
- from azure.core.exceptions import (
14
- ClientAuthenticationError,
15
- HttpResponseError,
16
- ResourceExistsError,
17
- ResourceNotFoundError,
18
- ResourceNotModifiedError,
19
- map_error,
20
- )
21
- from azure.core.paging import ItemPaged
22
- from azure.core.pipeline import PipelineResponse
23
- from azure.core.rest import HttpRequest, HttpResponse
24
- from azure.core.tracing.decorator import distributed_trace
25
- from azure.core.utils import case_insensitive_dict
26
- from azure.mgmt.core.exceptions import ARMErrorFormat
27
-
28
- from .. import models as _models
29
- from ..._serialization import Serializer
30
-
31
- if sys.version_info >= (3, 9):
32
- from collections.abc import MutableMapping
33
- else:
34
- from typing import MutableMapping # type: ignore
35
- T = TypeVar("T")
36
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
37
-
38
- _SERIALIZER = Serializer()
39
- _SERIALIZER.client_side_validation = False
40
-
41
-
42
- def build_list_request(resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
43
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
44
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
45
-
46
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
47
- accept = _headers.pop("Accept", "application/json")
48
-
49
- # Construct URL
50
- _url = kwargs.pop(
51
- "template_url",
52
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices",
53
- ) # pylint: disable=line-too-long
54
- path_format_arguments = {
55
- "resourceGroupName": _SERIALIZER.url(
56
- "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
57
- ),
58
- "accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
59
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
60
- }
61
-
62
- _url: str = _url.format(**path_format_arguments) # type: ignore
63
-
64
- # Construct parameters
65
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
66
-
67
- # Construct headers
68
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
69
-
70
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
71
-
72
-
73
- def build_set_service_properties_request(
74
- resource_group_name: str,
75
- account_name: str,
76
- blob_services_name: Union[str, _models.Enum27],
77
- subscription_id: str,
78
- **kwargs: Any
79
- ) -> HttpRequest:
80
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
81
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
82
-
83
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
84
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
85
- accept = _headers.pop("Accept", "application/json")
86
-
87
- # Construct URL
88
- _url = kwargs.pop(
89
- "template_url",
90
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}",
91
- ) # pylint: disable=line-too-long
92
- path_format_arguments = {
93
- "resourceGroupName": _SERIALIZER.url(
94
- "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
95
- ),
96
- "accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
97
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
98
- "BlobServicesName": _SERIALIZER.url("blob_services_name", blob_services_name, "str"),
99
- }
100
-
101
- _url: str = _url.format(**path_format_arguments) # type: ignore
102
-
103
- # Construct parameters
104
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
105
-
106
- # Construct headers
107
- if content_type is not None:
108
- _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
109
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
110
-
111
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
112
-
113
-
114
- def build_get_service_properties_request(
115
- resource_group_name: str,
116
- account_name: str,
117
- blob_services_name: Union[str, _models.Enum27],
118
- subscription_id: str,
119
- **kwargs: Any
120
- ) -> HttpRequest:
121
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
122
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
123
-
124
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
125
- accept = _headers.pop("Accept", "application/json")
126
-
127
- # Construct URL
128
- _url = kwargs.pop(
129
- "template_url",
130
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}",
131
- ) # pylint: disable=line-too-long
132
- path_format_arguments = {
133
- "resourceGroupName": _SERIALIZER.url(
134
- "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
135
- ),
136
- "accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
137
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
138
- "BlobServicesName": _SERIALIZER.url("blob_services_name", blob_services_name, "str"),
139
- }
140
-
141
- _url: str = _url.format(**path_format_arguments) # type: ignore
142
-
143
- # Construct parameters
144
- _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
145
-
146
- # Construct headers
147
- _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
148
-
149
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
150
-
151
-
152
- class BlobServicesOperations:
153
- """
154
- .. warning::
155
- **DO NOT** instantiate this class directly.
156
-
157
- Instead, you should access the following operations through
158
- :class:`~azure.mgmt.storage.v2019_06_01.StorageManagementClient`'s
159
- :attr:`blob_services` attribute.
160
- """
161
-
162
- models = _models
163
-
164
- def __init__(self, *args, **kwargs):
165
- input_args = list(args)
166
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
167
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
168
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
169
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
170
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
171
-
172
- @distributed_trace
173
- def list(
174
- self, resource_group_name: str, account_name: str, **kwargs: Any
175
- ) -> Iterable["_models.BlobServiceProperties"]:
176
- """List blob services of storage account. It returns a collection of one object named default.
177
-
178
- :param resource_group_name: The name of the resource group within the user's subscription. The
179
- name is case insensitive. Required.
180
- :type resource_group_name: str
181
- :param account_name: The name of the storage account within the specified resource group.
182
- Storage account names must be between 3 and 24 characters in length and use numbers and
183
- lower-case letters only. Required.
184
- :type account_name: str
185
- :return: An iterator like instance of either BlobServiceProperties or the result of
186
- cls(response)
187
- :rtype:
188
- ~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties]
189
- :raises ~azure.core.exceptions.HttpResponseError:
190
- """
191
- _headers = kwargs.pop("headers", {}) or {}
192
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
193
-
194
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
195
- cls: ClsType[_models.BlobServiceItems] = kwargs.pop("cls", None)
196
-
197
- error_map: MutableMapping = {
198
- 401: ClientAuthenticationError,
199
- 404: ResourceNotFoundError,
200
- 409: ResourceExistsError,
201
- 304: ResourceNotModifiedError,
202
- }
203
- error_map.update(kwargs.pop("error_map", {}) or {})
204
-
205
- def prepare_request(next_link=None):
206
- if not next_link:
207
-
208
- _request = build_list_request(
209
- resource_group_name=resource_group_name,
210
- account_name=account_name,
211
- subscription_id=self._config.subscription_id,
212
- api_version=api_version,
213
- headers=_headers,
214
- params=_params,
215
- )
216
- _request.url = self._client.format_url(_request.url)
217
-
218
- else:
219
- # make call to next link with the client's api-version
220
- _parsed_next_link = urllib.parse.urlparse(next_link)
221
- _next_request_params = case_insensitive_dict(
222
- {
223
- key: [urllib.parse.quote(v) for v in value]
224
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
225
- }
226
- )
227
- _next_request_params["api-version"] = self._api_version
228
- _request = HttpRequest(
229
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
230
- )
231
- _request.url = self._client.format_url(_request.url)
232
- _request.method = "GET"
233
- return _request
234
-
235
- def extract_data(pipeline_response):
236
- deserialized = self._deserialize("BlobServiceItems", pipeline_response)
237
- list_of_elem = deserialized.value
238
- if cls:
239
- list_of_elem = cls(list_of_elem) # type: ignore
240
- return None, iter(list_of_elem)
241
-
242
- def get_next(next_link=None):
243
- _request = prepare_request(next_link)
244
-
245
- _stream = False
246
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
247
- _request, stream=_stream, **kwargs
248
- )
249
- response = pipeline_response.http_response
250
-
251
- if response.status_code not in [200]:
252
- map_error(status_code=response.status_code, response=response, error_map=error_map)
253
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
254
-
255
- return pipeline_response
256
-
257
- return ItemPaged(get_next, extract_data)
258
-
259
- @overload
260
- def set_service_properties(
261
- self,
262
- resource_group_name: str,
263
- account_name: str,
264
- blob_services_name: Union[str, _models.Enum27],
265
- parameters: _models.BlobServiceProperties,
266
- *,
267
- content_type: str = "application/json",
268
- **kwargs: Any
269
- ) -> _models.BlobServiceProperties:
270
- """Sets the properties of a storage account’s Blob service, including properties for Storage
271
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
272
-
273
- :param resource_group_name: The name of the resource group within the user's subscription. The
274
- name is case insensitive. Required.
275
- :type resource_group_name: str
276
- :param account_name: The name of the storage account within the specified resource group.
277
- Storage account names must be between 3 and 24 characters in length and use numbers and
278
- lower-case letters only. Required.
279
- :type account_name: str
280
- :param blob_services_name: The name of the blob Service within the specified storage account.
281
- Blob Service Name must be 'default'. "default" Required.
282
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
283
- :param parameters: The properties of a storage account’s Blob service, including properties for
284
- Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. Required.
285
- :type parameters: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
286
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
287
- Default value is "application/json".
288
- :paramtype content_type: str
289
- :return: BlobServiceProperties or the result of cls(response)
290
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
291
- :raises ~azure.core.exceptions.HttpResponseError:
292
- """
293
-
294
- @overload
295
- def set_service_properties(
296
- self,
297
- resource_group_name: str,
298
- account_name: str,
299
- blob_services_name: Union[str, _models.Enum27],
300
- parameters: IO[bytes],
301
- *,
302
- content_type: str = "application/json",
303
- **kwargs: Any
304
- ) -> _models.BlobServiceProperties:
305
- """Sets the properties of a storage account’s Blob service, including properties for Storage
306
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
307
-
308
- :param resource_group_name: The name of the resource group within the user's subscription. The
309
- name is case insensitive. Required.
310
- :type resource_group_name: str
311
- :param account_name: The name of the storage account within the specified resource group.
312
- Storage account names must be between 3 and 24 characters in length and use numbers and
313
- lower-case letters only. Required.
314
- :type account_name: str
315
- :param blob_services_name: The name of the blob Service within the specified storage account.
316
- Blob Service Name must be 'default'. "default" Required.
317
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
318
- :param parameters: The properties of a storage account’s Blob service, including properties for
319
- Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. Required.
320
- :type parameters: IO[bytes]
321
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
322
- Default value is "application/json".
323
- :paramtype content_type: str
324
- :return: BlobServiceProperties or the result of cls(response)
325
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
326
- :raises ~azure.core.exceptions.HttpResponseError:
327
- """
328
-
329
- @distributed_trace
330
- def set_service_properties(
331
- self,
332
- resource_group_name: str,
333
- account_name: str,
334
- blob_services_name: Union[str, _models.Enum27],
335
- parameters: Union[_models.BlobServiceProperties, IO[bytes]],
336
- **kwargs: Any
337
- ) -> _models.BlobServiceProperties:
338
- """Sets the properties of a storage account’s Blob service, including properties for Storage
339
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
340
-
341
- :param resource_group_name: The name of the resource group within the user's subscription. The
342
- name is case insensitive. Required.
343
- :type resource_group_name: str
344
- :param account_name: The name of the storage account within the specified resource group.
345
- Storage account names must be between 3 and 24 characters in length and use numbers and
346
- lower-case letters only. Required.
347
- :type account_name: str
348
- :param blob_services_name: The name of the blob Service within the specified storage account.
349
- Blob Service Name must be 'default'. "default" Required.
350
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
351
- :param parameters: The properties of a storage account’s Blob service, including properties for
352
- Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. Is either a
353
- BlobServiceProperties type or a IO[bytes] type. Required.
354
- :type parameters: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties or IO[bytes]
355
- :return: BlobServiceProperties or the result of cls(response)
356
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
357
- :raises ~azure.core.exceptions.HttpResponseError:
358
- """
359
- error_map: MutableMapping = {
360
- 401: ClientAuthenticationError,
361
- 404: ResourceNotFoundError,
362
- 409: ResourceExistsError,
363
- 304: ResourceNotModifiedError,
364
- }
365
- error_map.update(kwargs.pop("error_map", {}) or {})
366
-
367
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
368
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
369
-
370
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
371
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
372
- cls: ClsType[_models.BlobServiceProperties] = kwargs.pop("cls", None)
373
-
374
- content_type = content_type or "application/json"
375
- _json = None
376
- _content = None
377
- if isinstance(parameters, (IOBase, bytes)):
378
- _content = parameters
379
- else:
380
- _json = self._serialize.body(parameters, "BlobServiceProperties")
381
-
382
- _request = build_set_service_properties_request(
383
- resource_group_name=resource_group_name,
384
- account_name=account_name,
385
- blob_services_name=blob_services_name,
386
- subscription_id=self._config.subscription_id,
387
- api_version=api_version,
388
- content_type=content_type,
389
- json=_json,
390
- content=_content,
391
- headers=_headers,
392
- params=_params,
393
- )
394
- _request.url = self._client.format_url(_request.url)
395
-
396
- _stream = False
397
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
398
- _request, stream=_stream, **kwargs
399
- )
400
-
401
- response = pipeline_response.http_response
402
-
403
- if response.status_code not in [200]:
404
- map_error(status_code=response.status_code, response=response, error_map=error_map)
405
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
406
-
407
- deserialized = self._deserialize("BlobServiceProperties", pipeline_response.http_response)
408
-
409
- if cls:
410
- return cls(pipeline_response, deserialized, {}) # type: ignore
411
-
412
- return deserialized # type: ignore
413
-
414
- @distributed_trace
415
- def get_service_properties(
416
- self, resource_group_name: str, account_name: str, blob_services_name: Union[str, _models.Enum27], **kwargs: Any
417
- ) -> _models.BlobServiceProperties:
418
- """Gets the properties of a storage account’s Blob service, including properties for Storage
419
- Analytics and CORS (Cross-Origin Resource Sharing) rules.
420
-
421
- :param resource_group_name: The name of the resource group within the user's subscription. The
422
- name is case insensitive. Required.
423
- :type resource_group_name: str
424
- :param account_name: The name of the storage account within the specified resource group.
425
- Storage account names must be between 3 and 24 characters in length and use numbers and
426
- lower-case letters only. Required.
427
- :type account_name: str
428
- :param blob_services_name: The name of the blob Service within the specified storage account.
429
- Blob Service Name must be 'default'. "default" Required.
430
- :type blob_services_name: str or ~azure.mgmt.storage.v2019_06_01.models.Enum27
431
- :return: BlobServiceProperties or the result of cls(response)
432
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobServiceProperties
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 = 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
- cls: ClsType[_models.BlobServiceProperties] = kwargs.pop("cls", None)
448
-
449
- _request = build_get_service_properties_request(
450
- resource_group_name=resource_group_name,
451
- account_name=account_name,
452
- blob_services_name=blob_services_name,
453
- subscription_id=self._config.subscription_id,
454
- api_version=api_version,
455
- headers=_headers,
456
- params=_params,
457
- )
458
- _request.url = self._client.format_url(_request.url)
459
-
460
- _stream = False
461
- pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
462
- _request, stream=_stream, **kwargs
463
- )
464
-
465
- response = pipeline_response.http_response
466
-
467
- if response.status_code not in [200]:
468
- map_error(status_code=response.status_code, response=response, error_map=error_map)
469
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
470
-
471
- deserialized = self._deserialize("BlobServiceProperties", pipeline_response.http_response)
472
-
473
- if cls:
474
- return cls(pipeline_response, deserialized, {}) # type: ignore
475
-
476
- return deserialized # type: ignore