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