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,124 +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
|
-
|
9
|
-
from copy import deepcopy
|
10
|
-
from typing import Any, Awaitable, TYPE_CHECKING
|
11
|
-
from typing_extensions import Self
|
12
|
-
|
13
|
-
from azure.core.pipeline import policies
|
14
|
-
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
15
|
-
from azure.mgmt.core import AsyncARMPipelineClient
|
16
|
-
from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy
|
17
|
-
|
18
|
-
from .. import models as _models
|
19
|
-
from ..._serialization import Deserializer, Serializer
|
20
|
-
from ._configuration import StorageManagementConfiguration
|
21
|
-
from .operations import Operations, SkusOperations, StorageAccountsOperations, UsageOperations
|
22
|
-
|
23
|
-
if TYPE_CHECKING:
|
24
|
-
from azure.core.credentials_async import AsyncTokenCredential
|
25
|
-
|
26
|
-
|
27
|
-
class StorageManagement:
|
28
|
-
"""The Azure Storage Management API.
|
29
|
-
|
30
|
-
:ivar operations: Operations operations
|
31
|
-
:vartype operations: azure.mgmt.storage.v2017_10_01.aio.operations.Operations
|
32
|
-
:ivar skus: SkusOperations operations
|
33
|
-
:vartype skus: azure.mgmt.storage.v2017_10_01.aio.operations.SkusOperations
|
34
|
-
:ivar storage_accounts: StorageAccountsOperations operations
|
35
|
-
:vartype storage_accounts:
|
36
|
-
azure.mgmt.storage.v2017_10_01.aio.operations.StorageAccountsOperations
|
37
|
-
:ivar usage: UsageOperations operations
|
38
|
-
:vartype usage: azure.mgmt.storage.v2017_10_01.aio.operations.UsageOperations
|
39
|
-
:param credential: Credential needed for the client to connect to Azure. Required.
|
40
|
-
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
41
|
-
:param subscription_id: Gets subscription credentials which uniquely identify the Microsoft
|
42
|
-
Azure subscription. The subscription ID forms part of the URI for every service call. Required.
|
43
|
-
:type subscription_id: str
|
44
|
-
:param base_url: Service URL. Default value is "https://management.azure.com".
|
45
|
-
:type base_url: str
|
46
|
-
:keyword api_version: Api Version. Default value is "2017-10-01". Note that overriding this
|
47
|
-
default value may result in unsupported behavior.
|
48
|
-
:paramtype api_version: str
|
49
|
-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
|
50
|
-
Retry-After header is present.
|
51
|
-
"""
|
52
|
-
|
53
|
-
def __init__(
|
54
|
-
self,
|
55
|
-
credential: "AsyncTokenCredential",
|
56
|
-
subscription_id: str,
|
57
|
-
base_url: str = "https://management.azure.com",
|
58
|
-
**kwargs: Any
|
59
|
-
) -> None:
|
60
|
-
self._config = StorageManagementConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
|
61
|
-
_policies = kwargs.pop("policies", None)
|
62
|
-
if _policies is None:
|
63
|
-
_policies = [
|
64
|
-
policies.RequestIdPolicy(**kwargs),
|
65
|
-
self._config.headers_policy,
|
66
|
-
self._config.user_agent_policy,
|
67
|
-
self._config.proxy_policy,
|
68
|
-
policies.ContentDecodePolicy(**kwargs),
|
69
|
-
AsyncARMAutoResourceProviderRegistrationPolicy(),
|
70
|
-
self._config.redirect_policy,
|
71
|
-
self._config.retry_policy,
|
72
|
-
self._config.authentication_policy,
|
73
|
-
self._config.custom_hook_policy,
|
74
|
-
self._config.logging_policy,
|
75
|
-
policies.DistributedTracingPolicy(**kwargs),
|
76
|
-
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
|
77
|
-
self._config.http_logging_policy,
|
78
|
-
]
|
79
|
-
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
|
80
|
-
|
81
|
-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
|
82
|
-
self._serialize = Serializer(client_models)
|
83
|
-
self._deserialize = Deserializer(client_models)
|
84
|
-
self._serialize.client_side_validation = False
|
85
|
-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize, "2017-10-01")
|
86
|
-
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize, "2017-10-01")
|
87
|
-
self.storage_accounts = StorageAccountsOperations(
|
88
|
-
self._client, self._config, self._serialize, self._deserialize, "2017-10-01"
|
89
|
-
)
|
90
|
-
self.usage = UsageOperations(self._client, self._config, self._serialize, self._deserialize, "2017-10-01")
|
91
|
-
|
92
|
-
def _send_request(
|
93
|
-
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
|
94
|
-
) -> Awaitable[AsyncHttpResponse]:
|
95
|
-
"""Runs the network request through the client's chained policies.
|
96
|
-
|
97
|
-
>>> from azure.core.rest import HttpRequest
|
98
|
-
>>> request = HttpRequest("GET", "https://www.example.org/")
|
99
|
-
<HttpRequest [GET], url: 'https://www.example.org/'>
|
100
|
-
>>> response = await client._send_request(request)
|
101
|
-
<AsyncHttpResponse: 200 OK>
|
102
|
-
|
103
|
-
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
|
104
|
-
|
105
|
-
:param request: The network request you want to make. Required.
|
106
|
-
:type request: ~azure.core.rest.HttpRequest
|
107
|
-
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
|
108
|
-
:return: The response of your network call. Does not do error handling on your response.
|
109
|
-
:rtype: ~azure.core.rest.AsyncHttpResponse
|
110
|
-
"""
|
111
|
-
|
112
|
-
request_copy = deepcopy(request)
|
113
|
-
request_copy.url = self._client.format_url(request_copy.url)
|
114
|
-
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
|
115
|
-
|
116
|
-
async def close(self) -> None:
|
117
|
-
await self._client.close()
|
118
|
-
|
119
|
-
async def __aenter__(self) -> Self:
|
120
|
-
await self._client.__aenter__()
|
121
|
-
return self
|
122
|
-
|
123
|
-
async def __aexit__(self, *exc_details: Any) -> None:
|
124
|
-
await self._client.__aexit__(*exc_details)
|
@@ -1,31 +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
|
-
# pylint: disable=wrong-import-position
|
9
|
-
|
10
|
-
from typing import TYPE_CHECKING
|
11
|
-
|
12
|
-
if TYPE_CHECKING:
|
13
|
-
from ._patch import * # pylint: disable=unused-wildcard-import
|
14
|
-
|
15
|
-
from ._operations import Operations # type: ignore
|
16
|
-
from ._skus_operations import SkusOperations # type: ignore
|
17
|
-
from ._storage_accounts_operations import StorageAccountsOperations # type: ignore
|
18
|
-
from ._usage_operations import UsageOperations # type: ignore
|
19
|
-
|
20
|
-
from ._patch import __all__ as _patch_all
|
21
|
-
from ._patch import *
|
22
|
-
from ._patch import patch_sdk as _patch_sdk
|
23
|
-
|
24
|
-
__all__ = [
|
25
|
-
"Operations",
|
26
|
-
"SkusOperations",
|
27
|
-
"StorageAccountsOperations",
|
28
|
-
"UsageOperations",
|
29
|
-
]
|
30
|
-
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
31
|
-
_patch_sdk()
|
@@ -1,130 +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._skus_operations import build_list_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 SkusOperations:
|
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.v2017_10_01.aio.StorageManagement`'s
|
45
|
-
:attr:`skus` 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(self, **kwargs: Any) -> AsyncIterable["_models.Sku"]:
|
60
|
-
"""Lists the available SKUs supported by Microsoft.Storage for given subscription.
|
61
|
-
|
62
|
-
:return: An iterator like instance of either Sku or the result of cls(response)
|
63
|
-
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.storage.v2017_10_01.models.Sku]
|
64
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
65
|
-
"""
|
66
|
-
_headers = kwargs.pop("headers", {}) or {}
|
67
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
68
|
-
|
69
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2017-10-01"))
|
70
|
-
cls: ClsType[_models.StorageSkuListResult] = kwargs.pop("cls", None)
|
71
|
-
|
72
|
-
error_map: MutableMapping = {
|
73
|
-
401: ClientAuthenticationError,
|
74
|
-
404: ResourceNotFoundError,
|
75
|
-
409: ResourceExistsError,
|
76
|
-
304: ResourceNotModifiedError,
|
77
|
-
}
|
78
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
79
|
-
|
80
|
-
def prepare_request(next_link=None):
|
81
|
-
if not next_link:
|
82
|
-
|
83
|
-
_request = build_list_request(
|
84
|
-
subscription_id=self._config.subscription_id,
|
85
|
-
api_version=api_version,
|
86
|
-
headers=_headers,
|
87
|
-
params=_params,
|
88
|
-
)
|
89
|
-
_request.url = self._client.format_url(_request.url)
|
90
|
-
|
91
|
-
else:
|
92
|
-
# make call to next link with the client's api-version
|
93
|
-
_parsed_next_link = urllib.parse.urlparse(next_link)
|
94
|
-
_next_request_params = case_insensitive_dict(
|
95
|
-
{
|
96
|
-
key: [urllib.parse.quote(v) for v in value]
|
97
|
-
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
|
98
|
-
}
|
99
|
-
)
|
100
|
-
_next_request_params["api-version"] = self._api_version
|
101
|
-
_request = HttpRequest(
|
102
|
-
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
|
103
|
-
)
|
104
|
-
_request.url = self._client.format_url(_request.url)
|
105
|
-
_request.method = "GET"
|
106
|
-
return _request
|
107
|
-
|
108
|
-
async def extract_data(pipeline_response):
|
109
|
-
deserialized = self._deserialize("StorageSkuListResult", pipeline_response)
|
110
|
-
list_of_elem = deserialized.value
|
111
|
-
if cls:
|
112
|
-
list_of_elem = cls(list_of_elem) # type: ignore
|
113
|
-
return None, AsyncList(list_of_elem)
|
114
|
-
|
115
|
-
async def get_next(next_link=None):
|
116
|
-
_request = prepare_request(next_link)
|
117
|
-
|
118
|
-
_stream = False
|
119
|
-
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
120
|
-
_request, stream=_stream, **kwargs
|
121
|
-
)
|
122
|
-
response = pipeline_response.http_response
|
123
|
-
|
124
|
-
if response.status_code not in [200]:
|
125
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
126
|
-
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
|
127
|
-
|
128
|
-
return pipeline_response
|
129
|
-
|
130
|
-
return AsyncItemPaged(get_next, extract_data)
|