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