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,394 +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.tracing.decorator_async import distributed_trace_async
|
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 ...operations._table_operations import (
|
30
|
-
build_create_request,
|
31
|
-
build_delete_request,
|
32
|
-
build_get_request,
|
33
|
-
build_list_request,
|
34
|
-
build_update_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 TableOperations:
|
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:`table` 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
|
-
@distributed_trace_async
|
66
|
-
async def create(
|
67
|
-
self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any
|
68
|
-
) -> _models.Table:
|
69
|
-
"""Creates a new table with the specified table name, under the specified account.
|
70
|
-
|
71
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
72
|
-
name is case insensitive. Required.
|
73
|
-
:type resource_group_name: str
|
74
|
-
:param account_name: The name of the storage account within the specified resource group.
|
75
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
76
|
-
lower-case letters only. Required.
|
77
|
-
:type account_name: str
|
78
|
-
:param table_name: A table name must be unique within a storage account and must be between 3
|
79
|
-
and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin
|
80
|
-
with a numeric character. Required.
|
81
|
-
:type table_name: str
|
82
|
-
:return: Table or the result of cls(response)
|
83
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.Table
|
84
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
85
|
-
"""
|
86
|
-
error_map: MutableMapping = {
|
87
|
-
401: ClientAuthenticationError,
|
88
|
-
404: ResourceNotFoundError,
|
89
|
-
409: ResourceExistsError,
|
90
|
-
304: ResourceNotModifiedError,
|
91
|
-
}
|
92
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
93
|
-
|
94
|
-
_headers = kwargs.pop("headers", {}) or {}
|
95
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
96
|
-
|
97
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
98
|
-
cls: ClsType[_models.Table] = kwargs.pop("cls", None)
|
99
|
-
|
100
|
-
_request = build_create_request(
|
101
|
-
resource_group_name=resource_group_name,
|
102
|
-
account_name=account_name,
|
103
|
-
table_name=table_name,
|
104
|
-
subscription_id=self._config.subscription_id,
|
105
|
-
api_version=api_version,
|
106
|
-
headers=_headers,
|
107
|
-
params=_params,
|
108
|
-
)
|
109
|
-
_request.url = self._client.format_url(_request.url)
|
110
|
-
|
111
|
-
_stream = False
|
112
|
-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
113
|
-
_request, stream=_stream, **kwargs
|
114
|
-
)
|
115
|
-
|
116
|
-
response = pipeline_response.http_response
|
117
|
-
|
118
|
-
if response.status_code not in [200]:
|
119
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
120
|
-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
121
|
-
|
122
|
-
deserialized = self._deserialize("Table", pipeline_response.http_response)
|
123
|
-
|
124
|
-
if cls:
|
125
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
126
|
-
|
127
|
-
return deserialized # type: ignore
|
128
|
-
|
129
|
-
@distributed_trace_async
|
130
|
-
async def update(
|
131
|
-
self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any
|
132
|
-
) -> _models.Table:
|
133
|
-
"""Creates a new table with the specified table name, under the specified account.
|
134
|
-
|
135
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
136
|
-
name is case insensitive. Required.
|
137
|
-
:type resource_group_name: str
|
138
|
-
:param account_name: The name of the storage account within the specified resource group.
|
139
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
140
|
-
lower-case letters only. Required.
|
141
|
-
:type account_name: str
|
142
|
-
:param table_name: A table name must be unique within a storage account and must be between 3
|
143
|
-
and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin
|
144
|
-
with a numeric character. Required.
|
145
|
-
:type table_name: str
|
146
|
-
:return: Table or the result of cls(response)
|
147
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.Table
|
148
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
149
|
-
"""
|
150
|
-
error_map: MutableMapping = {
|
151
|
-
401: ClientAuthenticationError,
|
152
|
-
404: ResourceNotFoundError,
|
153
|
-
409: ResourceExistsError,
|
154
|
-
304: ResourceNotModifiedError,
|
155
|
-
}
|
156
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
157
|
-
|
158
|
-
_headers = kwargs.pop("headers", {}) or {}
|
159
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
160
|
-
|
161
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
162
|
-
cls: ClsType[_models.Table] = kwargs.pop("cls", None)
|
163
|
-
|
164
|
-
_request = build_update_request(
|
165
|
-
resource_group_name=resource_group_name,
|
166
|
-
account_name=account_name,
|
167
|
-
table_name=table_name,
|
168
|
-
subscription_id=self._config.subscription_id,
|
169
|
-
api_version=api_version,
|
170
|
-
headers=_headers,
|
171
|
-
params=_params,
|
172
|
-
)
|
173
|
-
_request.url = self._client.format_url(_request.url)
|
174
|
-
|
175
|
-
_stream = False
|
176
|
-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
177
|
-
_request, stream=_stream, **kwargs
|
178
|
-
)
|
179
|
-
|
180
|
-
response = pipeline_response.http_response
|
181
|
-
|
182
|
-
if response.status_code not in [200]:
|
183
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
184
|
-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
185
|
-
|
186
|
-
deserialized = self._deserialize("Table", pipeline_response.http_response)
|
187
|
-
|
188
|
-
if cls:
|
189
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
190
|
-
|
191
|
-
return deserialized # type: ignore
|
192
|
-
|
193
|
-
@distributed_trace_async
|
194
|
-
async def get(self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any) -> _models.Table:
|
195
|
-
"""Gets the table with the specified table name, under the specified account if it exists.
|
196
|
-
|
197
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
198
|
-
name is case insensitive. Required.
|
199
|
-
:type resource_group_name: str
|
200
|
-
:param account_name: The name of the storage account within the specified resource group.
|
201
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
202
|
-
lower-case letters only. Required.
|
203
|
-
:type account_name: str
|
204
|
-
:param table_name: A table name must be unique within a storage account and must be between 3
|
205
|
-
and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin
|
206
|
-
with a numeric character. Required.
|
207
|
-
:type table_name: str
|
208
|
-
:return: Table or the result of cls(response)
|
209
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.Table
|
210
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
211
|
-
"""
|
212
|
-
error_map: MutableMapping = {
|
213
|
-
401: ClientAuthenticationError,
|
214
|
-
404: ResourceNotFoundError,
|
215
|
-
409: ResourceExistsError,
|
216
|
-
304: ResourceNotModifiedError,
|
217
|
-
}
|
218
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
219
|
-
|
220
|
-
_headers = kwargs.pop("headers", {}) or {}
|
221
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
222
|
-
|
223
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
224
|
-
cls: ClsType[_models.Table] = kwargs.pop("cls", None)
|
225
|
-
|
226
|
-
_request = build_get_request(
|
227
|
-
resource_group_name=resource_group_name,
|
228
|
-
account_name=account_name,
|
229
|
-
table_name=table_name,
|
230
|
-
subscription_id=self._config.subscription_id,
|
231
|
-
api_version=api_version,
|
232
|
-
headers=_headers,
|
233
|
-
params=_params,
|
234
|
-
)
|
235
|
-
_request.url = self._client.format_url(_request.url)
|
236
|
-
|
237
|
-
_stream = False
|
238
|
-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
239
|
-
_request, stream=_stream, **kwargs
|
240
|
-
)
|
241
|
-
|
242
|
-
response = pipeline_response.http_response
|
243
|
-
|
244
|
-
if response.status_code not in [200]:
|
245
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
246
|
-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
247
|
-
|
248
|
-
deserialized = self._deserialize("Table", pipeline_response.http_response)
|
249
|
-
|
250
|
-
if cls:
|
251
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
252
|
-
|
253
|
-
return deserialized # type: ignore
|
254
|
-
|
255
|
-
@distributed_trace_async
|
256
|
-
async def delete(self, resource_group_name: str, account_name: str, table_name: str, **kwargs: Any) -> None:
|
257
|
-
"""Deletes the table with the specified table name, under the specified account if it exists.
|
258
|
-
|
259
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
260
|
-
name is case insensitive. Required.
|
261
|
-
:type resource_group_name: str
|
262
|
-
:param account_name: The name of the storage account within the specified resource group.
|
263
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
264
|
-
lower-case letters only. Required.
|
265
|
-
:type account_name: str
|
266
|
-
:param table_name: A table name must be unique within a storage account and must be between 3
|
267
|
-
and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin
|
268
|
-
with a numeric character. Required.
|
269
|
-
:type table_name: str
|
270
|
-
:return: None or the result of cls(response)
|
271
|
-
:rtype: None
|
272
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
273
|
-
"""
|
274
|
-
error_map: MutableMapping = {
|
275
|
-
401: ClientAuthenticationError,
|
276
|
-
404: ResourceNotFoundError,
|
277
|
-
409: ResourceExistsError,
|
278
|
-
304: ResourceNotModifiedError,
|
279
|
-
}
|
280
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
281
|
-
|
282
|
-
_headers = kwargs.pop("headers", {}) or {}
|
283
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
284
|
-
|
285
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
286
|
-
cls: ClsType[None] = kwargs.pop("cls", None)
|
287
|
-
|
288
|
-
_request = build_delete_request(
|
289
|
-
resource_group_name=resource_group_name,
|
290
|
-
account_name=account_name,
|
291
|
-
table_name=table_name,
|
292
|
-
subscription_id=self._config.subscription_id,
|
293
|
-
api_version=api_version,
|
294
|
-
headers=_headers,
|
295
|
-
params=_params,
|
296
|
-
)
|
297
|
-
_request.url = self._client.format_url(_request.url)
|
298
|
-
|
299
|
-
_stream = False
|
300
|
-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
301
|
-
_request, stream=_stream, **kwargs
|
302
|
-
)
|
303
|
-
|
304
|
-
response = pipeline_response.http_response
|
305
|
-
|
306
|
-
if response.status_code not in [204]:
|
307
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
308
|
-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
309
|
-
|
310
|
-
if cls:
|
311
|
-
return cls(pipeline_response, None, {}) # type: ignore
|
312
|
-
|
313
|
-
@distributed_trace
|
314
|
-
def list(self, resource_group_name: str, account_name: str, **kwargs: Any) -> AsyncIterable["_models.Table"]:
|
315
|
-
"""Gets a list of all the tables under the specified storage account.
|
316
|
-
|
317
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
318
|
-
name is case insensitive. Required.
|
319
|
-
:type resource_group_name: str
|
320
|
-
:param account_name: The name of the storage account within the specified resource group.
|
321
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
322
|
-
lower-case letters only. Required.
|
323
|
-
:type account_name: str
|
324
|
-
:return: An iterator like instance of either Table or the result of cls(response)
|
325
|
-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2019_06_01.models.Table]
|
326
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
327
|
-
"""
|
328
|
-
_headers = kwargs.pop("headers", {}) or {}
|
329
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
330
|
-
|
331
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
332
|
-
cls: ClsType[_models.ListTableResource] = kwargs.pop("cls", None)
|
333
|
-
|
334
|
-
error_map: MutableMapping = {
|
335
|
-
401: ClientAuthenticationError,
|
336
|
-
404: ResourceNotFoundError,
|
337
|
-
409: ResourceExistsError,
|
338
|
-
304: ResourceNotModifiedError,
|
339
|
-
}
|
340
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
341
|
-
|
342
|
-
def prepare_request(next_link=None):
|
343
|
-
if not next_link:
|
344
|
-
|
345
|
-
_request = build_list_request(
|
346
|
-
resource_group_name=resource_group_name,
|
347
|
-
account_name=account_name,
|
348
|
-
subscription_id=self._config.subscription_id,
|
349
|
-
api_version=api_version,
|
350
|
-
headers=_headers,
|
351
|
-
params=_params,
|
352
|
-
)
|
353
|
-
_request.url = self._client.format_url(_request.url)
|
354
|
-
|
355
|
-
else:
|
356
|
-
# make call to next link with the client's api-version
|
357
|
-
_parsed_next_link = urllib.parse.urlparse(next_link)
|
358
|
-
_next_request_params = case_insensitive_dict(
|
359
|
-
{
|
360
|
-
key: [urllib.parse.quote(v) for v in value]
|
361
|
-
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
|
362
|
-
}
|
363
|
-
)
|
364
|
-
_next_request_params["api-version"] = self._api_version
|
365
|
-
_request = HttpRequest(
|
366
|
-
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
|
367
|
-
)
|
368
|
-
_request.url = self._client.format_url(_request.url)
|
369
|
-
_request.method = "GET"
|
370
|
-
return _request
|
371
|
-
|
372
|
-
async def extract_data(pipeline_response):
|
373
|
-
deserialized = self._deserialize("ListTableResource", pipeline_response)
|
374
|
-
list_of_elem = deserialized.value
|
375
|
-
if cls:
|
376
|
-
list_of_elem = cls(list_of_elem) # type: ignore
|
377
|
-
return deserialized.next_link or None, AsyncList(list_of_elem)
|
378
|
-
|
379
|
-
async def get_next(next_link=None):
|
380
|
-
_request = prepare_request(next_link)
|
381
|
-
|
382
|
-
_stream = False
|
383
|
-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
384
|
-
_request, stream=_stream, **kwargs
|
385
|
-
)
|
386
|
-
response = pipeline_response.http_response
|
387
|
-
|
388
|
-
if response.status_code not in [200]:
|
389
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
390
|
-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
391
|
-
|
392
|
-
return pipeline_response
|
393
|
-
|
394
|
-
return AsyncItemPaged(get_next, extract_data)
|