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,538 +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._encryption_scopes_operations import (
31
- build_get_request,
32
- build_list_request,
33
- build_patch_request,
34
- build_put_request,
35
- )
36
-
37
- if sys.version_info >= (3, 9):
38
- from collections.abc import MutableMapping
39
- else:
40
- from typing import MutableMapping # type: ignore
41
- T = TypeVar("T")
42
- ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
43
-
44
-
45
- class EncryptionScopesOperations:
46
- """
47
- .. warning::
48
- **DO NOT** instantiate this class directly.
49
-
50
- Instead, you should access the following operations through
51
- :class:`~azure.mgmt.storage.v2019_06_01.aio.StorageManagementClient`'s
52
- :attr:`encryption_scopes` attribute.
53
- """
54
-
55
- models = _models
56
-
57
- def __init__(self, *args, **kwargs) -> None:
58
- input_args = list(args)
59
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
60
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
61
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
62
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
63
- self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
64
-
65
- @overload
66
- async def put(
67
- self,
68
- resource_group_name: str,
69
- account_name: str,
70
- encryption_scope_name: str,
71
- encryption_scope: _models.EncryptionScope,
72
- *,
73
- content_type: str = "application/json",
74
- **kwargs: Any
75
- ) -> _models.EncryptionScope:
76
- """Synchronously creates or updates an encryption scope under the specified storage account. If an
77
- encryption scope is already created and a subsequent request is issued with different
78
- properties, the encryption scope properties will be updated per the specified request.
79
-
80
- :param resource_group_name: The name of the resource group within the user's subscription. The
81
- name is case insensitive. Required.
82
- :type resource_group_name: str
83
- :param account_name: The name of the storage account within the specified resource group.
84
- Storage account names must be between 3 and 24 characters in length and use numbers and
85
- lower-case letters only. Required.
86
- :type account_name: str
87
- :param encryption_scope_name: The name of the encryption scope within the specified storage
88
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
89
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
90
- followed by a letter or number. Required.
91
- :type encryption_scope_name: str
92
- :param encryption_scope: Encryption scope properties to be used for the create or update.
93
- Required.
94
- :type encryption_scope: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
95
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
96
- Default value is "application/json".
97
- :paramtype content_type: str
98
- :return: EncryptionScope or the result of cls(response)
99
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
100
- :raises ~azure.core.exceptions.HttpResponseError:
101
- """
102
-
103
- @overload
104
- async def put(
105
- self,
106
- resource_group_name: str,
107
- account_name: str,
108
- encryption_scope_name: str,
109
- encryption_scope: IO[bytes],
110
- *,
111
- content_type: str = "application/json",
112
- **kwargs: Any
113
- ) -> _models.EncryptionScope:
114
- """Synchronously creates or updates an encryption scope under the specified storage account. If an
115
- encryption scope is already created and a subsequent request is issued with different
116
- properties, the encryption scope properties will be updated per the specified request.
117
-
118
- :param resource_group_name: The name of the resource group within the user's subscription. The
119
- name is case insensitive. Required.
120
- :type resource_group_name: str
121
- :param account_name: The name of the storage account within the specified resource group.
122
- Storage account names must be between 3 and 24 characters in length and use numbers and
123
- lower-case letters only. Required.
124
- :type account_name: str
125
- :param encryption_scope_name: The name of the encryption scope within the specified storage
126
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
127
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
128
- followed by a letter or number. Required.
129
- :type encryption_scope_name: str
130
- :param encryption_scope: Encryption scope properties to be used for the create or update.
131
- Required.
132
- :type encryption_scope: IO[bytes]
133
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
134
- Default value is "application/json".
135
- :paramtype content_type: str
136
- :return: EncryptionScope or the result of cls(response)
137
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
138
- :raises ~azure.core.exceptions.HttpResponseError:
139
- """
140
-
141
- @distributed_trace_async
142
- async def put(
143
- self,
144
- resource_group_name: str,
145
- account_name: str,
146
- encryption_scope_name: str,
147
- encryption_scope: Union[_models.EncryptionScope, IO[bytes]],
148
- **kwargs: Any
149
- ) -> _models.EncryptionScope:
150
- """Synchronously creates or updates an encryption scope under the specified storage account. If an
151
- encryption scope is already created and a subsequent request is issued with different
152
- properties, the encryption scope properties will be updated per the specified request.
153
-
154
- :param resource_group_name: The name of the resource group within the user's subscription. The
155
- name is case insensitive. Required.
156
- :type resource_group_name: str
157
- :param account_name: The name of the storage account within the specified resource group.
158
- Storage account names must be between 3 and 24 characters in length and use numbers and
159
- lower-case letters only. Required.
160
- :type account_name: str
161
- :param encryption_scope_name: The name of the encryption scope within the specified storage
162
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
163
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
164
- followed by a letter or number. Required.
165
- :type encryption_scope_name: str
166
- :param encryption_scope: Encryption scope properties to be used for the create or update. Is
167
- either a EncryptionScope type or a IO[bytes] type. Required.
168
- :type encryption_scope: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope or IO[bytes]
169
- :return: EncryptionScope or the result of cls(response)
170
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
171
- :raises ~azure.core.exceptions.HttpResponseError:
172
- """
173
- error_map: MutableMapping = {
174
- 401: ClientAuthenticationError,
175
- 404: ResourceNotFoundError,
176
- 409: ResourceExistsError,
177
- 304: ResourceNotModifiedError,
178
- }
179
- error_map.update(kwargs.pop("error_map", {}) or {})
180
-
181
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
182
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
183
-
184
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
185
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
186
- cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
187
-
188
- content_type = content_type or "application/json"
189
- _json = None
190
- _content = None
191
- if isinstance(encryption_scope, (IOBase, bytes)):
192
- _content = encryption_scope
193
- else:
194
- _json = self._serialize.body(encryption_scope, "EncryptionScope")
195
-
196
- _request = build_put_request(
197
- resource_group_name=resource_group_name,
198
- account_name=account_name,
199
- encryption_scope_name=encryption_scope_name,
200
- subscription_id=self._config.subscription_id,
201
- api_version=api_version,
202
- content_type=content_type,
203
- json=_json,
204
- content=_content,
205
- headers=_headers,
206
- params=_params,
207
- )
208
- _request.url = self._client.format_url(_request.url)
209
-
210
- _stream = False
211
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
212
- _request, stream=_stream, **kwargs
213
- )
214
-
215
- response = pipeline_response.http_response
216
-
217
- if response.status_code not in [200, 201]:
218
- map_error(status_code=response.status_code, response=response, error_map=error_map)
219
- error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
220
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
221
-
222
- deserialized = self._deserialize("EncryptionScope", pipeline_response.http_response)
223
-
224
- if cls:
225
- return cls(pipeline_response, deserialized, {}) # type: ignore
226
-
227
- return deserialized # type: ignore
228
-
229
- @overload
230
- async def patch(
231
- self,
232
- resource_group_name: str,
233
- account_name: str,
234
- encryption_scope_name: str,
235
- encryption_scope: _models.EncryptionScope,
236
- *,
237
- content_type: str = "application/json",
238
- **kwargs: Any
239
- ) -> _models.EncryptionScope:
240
- """Update encryption scope properties as specified in the request body. Update fails if the
241
- specified encryption scope does not already exist.
242
-
243
- :param resource_group_name: The name of the resource group within the user's subscription. The
244
- name is case insensitive. Required.
245
- :type resource_group_name: str
246
- :param account_name: The name of the storage account within the specified resource group.
247
- Storage account names must be between 3 and 24 characters in length and use numbers and
248
- lower-case letters only. Required.
249
- :type account_name: str
250
- :param encryption_scope_name: The name of the encryption scope within the specified storage
251
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
252
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
253
- followed by a letter or number. Required.
254
- :type encryption_scope_name: str
255
- :param encryption_scope: Encryption scope properties to be used for the update. Required.
256
- :type encryption_scope: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
257
- :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
258
- Default value is "application/json".
259
- :paramtype content_type: str
260
- :return: EncryptionScope or the result of cls(response)
261
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
262
- :raises ~azure.core.exceptions.HttpResponseError:
263
- """
264
-
265
- @overload
266
- async def patch(
267
- self,
268
- resource_group_name: str,
269
- account_name: str,
270
- encryption_scope_name: str,
271
- encryption_scope: IO[bytes],
272
- *,
273
- content_type: str = "application/json",
274
- **kwargs: Any
275
- ) -> _models.EncryptionScope:
276
- """Update encryption scope properties as specified in the request body. Update fails if the
277
- specified encryption scope does not already exist.
278
-
279
- :param resource_group_name: The name of the resource group within the user's subscription. The
280
- name is case insensitive. Required.
281
- :type resource_group_name: str
282
- :param account_name: The name of the storage account within the specified resource group.
283
- Storage account names must be between 3 and 24 characters in length and use numbers and
284
- lower-case letters only. Required.
285
- :type account_name: str
286
- :param encryption_scope_name: The name of the encryption scope within the specified storage
287
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
288
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
289
- followed by a letter or number. Required.
290
- :type encryption_scope_name: str
291
- :param encryption_scope: Encryption scope properties to be used for the update. Required.
292
- :type encryption_scope: IO[bytes]
293
- :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
294
- Default value is "application/json".
295
- :paramtype content_type: str
296
- :return: EncryptionScope or the result of cls(response)
297
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
298
- :raises ~azure.core.exceptions.HttpResponseError:
299
- """
300
-
301
- @distributed_trace_async
302
- async def patch(
303
- self,
304
- resource_group_name: str,
305
- account_name: str,
306
- encryption_scope_name: str,
307
- encryption_scope: Union[_models.EncryptionScope, IO[bytes]],
308
- **kwargs: Any
309
- ) -> _models.EncryptionScope:
310
- """Update encryption scope properties as specified in the request body. Update fails if the
311
- specified encryption scope does not already exist.
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 encryption_scope_name: The name of the encryption scope within the specified storage
321
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
322
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
323
- followed by a letter or number. Required.
324
- :type encryption_scope_name: str
325
- :param encryption_scope: Encryption scope properties to be used for the update. Is either a
326
- EncryptionScope type or a IO[bytes] type. Required.
327
- :type encryption_scope: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope or IO[bytes]
328
- :return: EncryptionScope or the result of cls(response)
329
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
330
- :raises ~azure.core.exceptions.HttpResponseError:
331
- """
332
- error_map: MutableMapping = {
333
- 401: ClientAuthenticationError,
334
- 404: ResourceNotFoundError,
335
- 409: ResourceExistsError,
336
- 304: ResourceNotModifiedError,
337
- }
338
- error_map.update(kwargs.pop("error_map", {}) or {})
339
-
340
- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
341
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
342
-
343
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
344
- content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
345
- cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
346
-
347
- content_type = content_type or "application/json"
348
- _json = None
349
- _content = None
350
- if isinstance(encryption_scope, (IOBase, bytes)):
351
- _content = encryption_scope
352
- else:
353
- _json = self._serialize.body(encryption_scope, "EncryptionScope")
354
-
355
- _request = build_patch_request(
356
- resource_group_name=resource_group_name,
357
- account_name=account_name,
358
- encryption_scope_name=encryption_scope_name,
359
- subscription_id=self._config.subscription_id,
360
- api_version=api_version,
361
- content_type=content_type,
362
- json=_json,
363
- content=_content,
364
- headers=_headers,
365
- params=_params,
366
- )
367
- _request.url = self._client.format_url(_request.url)
368
-
369
- _stream = False
370
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
371
- _request, stream=_stream, **kwargs
372
- )
373
-
374
- response = pipeline_response.http_response
375
-
376
- if response.status_code not in [200]:
377
- map_error(status_code=response.status_code, response=response, error_map=error_map)
378
- error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
379
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
380
-
381
- deserialized = self._deserialize("EncryptionScope", pipeline_response.http_response)
382
-
383
- if cls:
384
- return cls(pipeline_response, deserialized, {}) # type: ignore
385
-
386
- return deserialized # type: ignore
387
-
388
- @distributed_trace_async
389
- async def get(
390
- self, resource_group_name: str, account_name: str, encryption_scope_name: str, **kwargs: Any
391
- ) -> _models.EncryptionScope:
392
- """Returns the properties for the specified encryption scope.
393
-
394
- :param resource_group_name: The name of the resource group within the user's subscription. The
395
- name is case insensitive. Required.
396
- :type resource_group_name: str
397
- :param account_name: The name of the storage account within the specified resource group.
398
- Storage account names must be between 3 and 24 characters in length and use numbers and
399
- lower-case letters only. Required.
400
- :type account_name: str
401
- :param encryption_scope_name: The name of the encryption scope within the specified storage
402
- account. Encryption scope names must be between 3 and 63 characters in length and use numbers,
403
- lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and
404
- followed by a letter or number. Required.
405
- :type encryption_scope_name: str
406
- :return: EncryptionScope or the result of cls(response)
407
- :rtype: ~azure.mgmt.storage.v2019_06_01.models.EncryptionScope
408
- :raises ~azure.core.exceptions.HttpResponseError:
409
- """
410
- error_map: MutableMapping = {
411
- 401: ClientAuthenticationError,
412
- 404: ResourceNotFoundError,
413
- 409: ResourceExistsError,
414
- 304: ResourceNotModifiedError,
415
- }
416
- error_map.update(kwargs.pop("error_map", {}) or {})
417
-
418
- _headers = kwargs.pop("headers", {}) or {}
419
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
420
-
421
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
422
- cls: ClsType[_models.EncryptionScope] = kwargs.pop("cls", None)
423
-
424
- _request = build_get_request(
425
- resource_group_name=resource_group_name,
426
- account_name=account_name,
427
- encryption_scope_name=encryption_scope_name,
428
- subscription_id=self._config.subscription_id,
429
- api_version=api_version,
430
- headers=_headers,
431
- params=_params,
432
- )
433
- _request.url = self._client.format_url(_request.url)
434
-
435
- _stream = False
436
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
437
- _request, stream=_stream, **kwargs
438
- )
439
-
440
- response = pipeline_response.http_response
441
-
442
- if response.status_code not in [200]:
443
- map_error(status_code=response.status_code, response=response, error_map=error_map)
444
- error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
445
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
446
-
447
- deserialized = self._deserialize("EncryptionScope", pipeline_response.http_response)
448
-
449
- if cls:
450
- return cls(pipeline_response, deserialized, {}) # type: ignore
451
-
452
- return deserialized # type: ignore
453
-
454
- @distributed_trace
455
- def list(
456
- self, resource_group_name: str, account_name: str, **kwargs: Any
457
- ) -> AsyncIterable["_models.EncryptionScope"]:
458
- """Lists all the encryption scopes available under the specified storage account.
459
-
460
- :param resource_group_name: The name of the resource group within the user's subscription. The
461
- name is case insensitive. Required.
462
- :type resource_group_name: str
463
- :param account_name: The name of the storage account within the specified resource group.
464
- Storage account names must be between 3 and 24 characters in length and use numbers and
465
- lower-case letters only. Required.
466
- :type account_name: str
467
- :return: An iterator like instance of either EncryptionScope or the result of cls(response)
468
- :rtype:
469
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2019_06_01.models.EncryptionScope]
470
- :raises ~azure.core.exceptions.HttpResponseError:
471
- """
472
- _headers = kwargs.pop("headers", {}) or {}
473
- _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
474
-
475
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
476
- cls: ClsType[_models.EncryptionScopeListResult] = kwargs.pop("cls", None)
477
-
478
- error_map: MutableMapping = {
479
- 401: ClientAuthenticationError,
480
- 404: ResourceNotFoundError,
481
- 409: ResourceExistsError,
482
- 304: ResourceNotModifiedError,
483
- }
484
- error_map.update(kwargs.pop("error_map", {}) or {})
485
-
486
- def prepare_request(next_link=None):
487
- if not next_link:
488
-
489
- _request = build_list_request(
490
- resource_group_name=resource_group_name,
491
- account_name=account_name,
492
- subscription_id=self._config.subscription_id,
493
- api_version=api_version,
494
- headers=_headers,
495
- params=_params,
496
- )
497
- _request.url = self._client.format_url(_request.url)
498
-
499
- else:
500
- # make call to next link with the client's api-version
501
- _parsed_next_link = urllib.parse.urlparse(next_link)
502
- _next_request_params = case_insensitive_dict(
503
- {
504
- key: [urllib.parse.quote(v) for v in value]
505
- for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
506
- }
507
- )
508
- _next_request_params["api-version"] = self._api_version
509
- _request = HttpRequest(
510
- "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
511
- )
512
- _request.url = self._client.format_url(_request.url)
513
- _request.method = "GET"
514
- return _request
515
-
516
- async def extract_data(pipeline_response):
517
- deserialized = self._deserialize("EncryptionScopeListResult", pipeline_response)
518
- list_of_elem = deserialized.value
519
- if cls:
520
- list_of_elem = cls(list_of_elem) # type: ignore
521
- return deserialized.next_link or None, AsyncList(list_of_elem)
522
-
523
- async def get_next(next_link=None):
524
- _request = prepare_request(next_link)
525
-
526
- _stream = False
527
- pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
528
- _request, stream=_stream, **kwargs
529
- )
530
- response = pipeline_response.http_response
531
-
532
- if response.status_code not in [200]:
533
- map_error(status_code=response.status_code, response=response, error_map=error_map)
534
- raise HttpResponseError(response=response, error_format=ARMErrorFormat)
535
-
536
- return pipeline_response
537
-
538
- return AsyncItemPaged(get_next, extract_data)