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,582 +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, Iterable, Optional, TypeVar, Union, overload
|
11
|
-
import urllib.parse
|
12
|
-
|
13
|
-
from azure.core.exceptions import (
|
14
|
-
ClientAuthenticationError,
|
15
|
-
HttpResponseError,
|
16
|
-
ResourceExistsError,
|
17
|
-
ResourceNotFoundError,
|
18
|
-
ResourceNotModifiedError,
|
19
|
-
map_error,
|
20
|
-
)
|
21
|
-
from azure.core.paging import ItemPaged
|
22
|
-
from azure.core.pipeline import PipelineResponse
|
23
|
-
from azure.core.rest import HttpRequest, HttpResponse
|
24
|
-
from azure.core.tracing.decorator import distributed_trace
|
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 ..._serialization import Serializer
|
30
|
-
|
31
|
-
if sys.version_info >= (3, 9):
|
32
|
-
from collections.abc import MutableMapping
|
33
|
-
else:
|
34
|
-
from typing import MutableMapping # type: ignore
|
35
|
-
T = TypeVar("T")
|
36
|
-
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
37
|
-
|
38
|
-
_SERIALIZER = Serializer()
|
39
|
-
_SERIALIZER.client_side_validation = False
|
40
|
-
|
41
|
-
|
42
|
-
def build_get_request(
|
43
|
-
resource_group_name: str,
|
44
|
-
account_name: str,
|
45
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
46
|
-
subscription_id: str,
|
47
|
-
**kwargs: Any
|
48
|
-
) -> HttpRequest:
|
49
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
50
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
51
|
-
|
52
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
|
53
|
-
accept = _headers.pop("Accept", "application/json")
|
54
|
-
|
55
|
-
# Construct URL
|
56
|
-
_url = kwargs.pop(
|
57
|
-
"template_url",
|
58
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}",
|
59
|
-
) # pylint: disable=line-too-long
|
60
|
-
path_format_arguments = {
|
61
|
-
"resourceGroupName": _SERIALIZER.url(
|
62
|
-
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
|
63
|
-
),
|
64
|
-
"accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
|
65
|
-
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
|
66
|
-
"blobInventoryPolicyName": _SERIALIZER.url("blob_inventory_policy_name", blob_inventory_policy_name, "str"),
|
67
|
-
}
|
68
|
-
|
69
|
-
_url: str = _url.format(**path_format_arguments) # type: ignore
|
70
|
-
|
71
|
-
# Construct parameters
|
72
|
-
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
|
73
|
-
|
74
|
-
# Construct headers
|
75
|
-
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
76
|
-
|
77
|
-
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
78
|
-
|
79
|
-
|
80
|
-
def build_create_or_update_request(
|
81
|
-
resource_group_name: str,
|
82
|
-
account_name: str,
|
83
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
84
|
-
subscription_id: str,
|
85
|
-
**kwargs: Any
|
86
|
-
) -> HttpRequest:
|
87
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
88
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
89
|
-
|
90
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
|
91
|
-
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
92
|
-
accept = _headers.pop("Accept", "application/json")
|
93
|
-
|
94
|
-
# Construct URL
|
95
|
-
_url = kwargs.pop(
|
96
|
-
"template_url",
|
97
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}",
|
98
|
-
) # pylint: disable=line-too-long
|
99
|
-
path_format_arguments = {
|
100
|
-
"resourceGroupName": _SERIALIZER.url(
|
101
|
-
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
|
102
|
-
),
|
103
|
-
"accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
|
104
|
-
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
|
105
|
-
"blobInventoryPolicyName": _SERIALIZER.url("blob_inventory_policy_name", blob_inventory_policy_name, "str"),
|
106
|
-
}
|
107
|
-
|
108
|
-
_url: str = _url.format(**path_format_arguments) # type: ignore
|
109
|
-
|
110
|
-
# Construct parameters
|
111
|
-
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
|
112
|
-
|
113
|
-
# Construct headers
|
114
|
-
if content_type is not None:
|
115
|
-
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
|
116
|
-
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
117
|
-
|
118
|
-
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
|
119
|
-
|
120
|
-
|
121
|
-
def build_delete_request(
|
122
|
-
resource_group_name: str,
|
123
|
-
account_name: str,
|
124
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
125
|
-
subscription_id: str,
|
126
|
-
**kwargs: Any
|
127
|
-
) -> HttpRequest:
|
128
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
129
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
130
|
-
|
131
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
|
132
|
-
accept = _headers.pop("Accept", "application/json")
|
133
|
-
|
134
|
-
# Construct URL
|
135
|
-
_url = kwargs.pop(
|
136
|
-
"template_url",
|
137
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}",
|
138
|
-
) # pylint: disable=line-too-long
|
139
|
-
path_format_arguments = {
|
140
|
-
"resourceGroupName": _SERIALIZER.url(
|
141
|
-
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
|
142
|
-
),
|
143
|
-
"accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
|
144
|
-
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
|
145
|
-
"blobInventoryPolicyName": _SERIALIZER.url("blob_inventory_policy_name", blob_inventory_policy_name, "str"),
|
146
|
-
}
|
147
|
-
|
148
|
-
_url: str = _url.format(**path_format_arguments) # type: ignore
|
149
|
-
|
150
|
-
# Construct parameters
|
151
|
-
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
|
152
|
-
|
153
|
-
# Construct headers
|
154
|
-
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
155
|
-
|
156
|
-
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
|
157
|
-
|
158
|
-
|
159
|
-
def build_list_request(resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
|
160
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
161
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
162
|
-
|
163
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
|
164
|
-
accept = _headers.pop("Accept", "application/json")
|
165
|
-
|
166
|
-
# Construct URL
|
167
|
-
_url = kwargs.pop(
|
168
|
-
"template_url",
|
169
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies",
|
170
|
-
) # pylint: disable=line-too-long
|
171
|
-
path_format_arguments = {
|
172
|
-
"resourceGroupName": _SERIALIZER.url(
|
173
|
-
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._\(\)]+$"
|
174
|
-
),
|
175
|
-
"accountName": _SERIALIZER.url("account_name", account_name, "str", max_length=24, min_length=3),
|
176
|
-
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str", min_length=1),
|
177
|
-
}
|
178
|
-
|
179
|
-
_url: str = _url.format(**path_format_arguments) # type: ignore
|
180
|
-
|
181
|
-
# Construct parameters
|
182
|
-
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
|
183
|
-
|
184
|
-
# Construct headers
|
185
|
-
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
186
|
-
|
187
|
-
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
188
|
-
|
189
|
-
|
190
|
-
class BlobInventoryPoliciesOperations:
|
191
|
-
"""
|
192
|
-
.. warning::
|
193
|
-
**DO NOT** instantiate this class directly.
|
194
|
-
|
195
|
-
Instead, you should access the following operations through
|
196
|
-
:class:`~azure.mgmt.storage.v2019_06_01.StorageManagementClient`'s
|
197
|
-
:attr:`blob_inventory_policies` attribute.
|
198
|
-
"""
|
199
|
-
|
200
|
-
models = _models
|
201
|
-
|
202
|
-
def __init__(self, *args, **kwargs):
|
203
|
-
input_args = list(args)
|
204
|
-
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
|
205
|
-
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
|
206
|
-
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
207
|
-
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
208
|
-
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")
|
209
|
-
|
210
|
-
@distributed_trace
|
211
|
-
def get(
|
212
|
-
self,
|
213
|
-
resource_group_name: str,
|
214
|
-
account_name: str,
|
215
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
216
|
-
**kwargs: Any
|
217
|
-
) -> _models.BlobInventoryPolicy:
|
218
|
-
"""Gets the blob inventory policy associated with the specified storage account.
|
219
|
-
|
220
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
221
|
-
name is case insensitive. Required.
|
222
|
-
:type resource_group_name: str
|
223
|
-
:param account_name: The name of the storage account within the specified resource group.
|
224
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
225
|
-
lower-case letters only. Required.
|
226
|
-
:type account_name: str
|
227
|
-
:param blob_inventory_policy_name: The name of the storage account blob inventory policy. It
|
228
|
-
should always be 'default'. "default" Required.
|
229
|
-
:type blob_inventory_policy_name: str or
|
230
|
-
~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicyName
|
231
|
-
:return: BlobInventoryPolicy or the result of cls(response)
|
232
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy
|
233
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
234
|
-
"""
|
235
|
-
error_map: MutableMapping = {
|
236
|
-
401: ClientAuthenticationError,
|
237
|
-
404: ResourceNotFoundError,
|
238
|
-
409: ResourceExistsError,
|
239
|
-
304: ResourceNotModifiedError,
|
240
|
-
}
|
241
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
242
|
-
|
243
|
-
_headers = kwargs.pop("headers", {}) or {}
|
244
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
245
|
-
|
246
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
247
|
-
cls: ClsType[_models.BlobInventoryPolicy] = kwargs.pop("cls", None)
|
248
|
-
|
249
|
-
_request = build_get_request(
|
250
|
-
resource_group_name=resource_group_name,
|
251
|
-
account_name=account_name,
|
252
|
-
blob_inventory_policy_name=blob_inventory_policy_name,
|
253
|
-
subscription_id=self._config.subscription_id,
|
254
|
-
api_version=api_version,
|
255
|
-
headers=_headers,
|
256
|
-
params=_params,
|
257
|
-
)
|
258
|
-
_request.url = self._client.format_url(_request.url)
|
259
|
-
|
260
|
-
_stream = False
|
261
|
-
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
262
|
-
_request, stream=_stream, **kwargs
|
263
|
-
)
|
264
|
-
|
265
|
-
response = pipeline_response.http_response
|
266
|
-
|
267
|
-
if response.status_code not in [200]:
|
268
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
269
|
-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
|
270
|
-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
271
|
-
|
272
|
-
deserialized = self._deserialize("BlobInventoryPolicy", pipeline_response.http_response)
|
273
|
-
|
274
|
-
if cls:
|
275
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
276
|
-
|
277
|
-
return deserialized # type: ignore
|
278
|
-
|
279
|
-
@overload
|
280
|
-
def create_or_update(
|
281
|
-
self,
|
282
|
-
resource_group_name: str,
|
283
|
-
account_name: str,
|
284
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
285
|
-
properties: _models.BlobInventoryPolicy,
|
286
|
-
*,
|
287
|
-
content_type: str = "application/json",
|
288
|
-
**kwargs: Any
|
289
|
-
) -> _models.BlobInventoryPolicy:
|
290
|
-
"""Sets the blob inventory policy to the specified storage account.
|
291
|
-
|
292
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
293
|
-
name is case insensitive. Required.
|
294
|
-
:type resource_group_name: str
|
295
|
-
:param account_name: The name of the storage account within the specified resource group.
|
296
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
297
|
-
lower-case letters only. Required.
|
298
|
-
:type account_name: str
|
299
|
-
:param blob_inventory_policy_name: The name of the storage account blob inventory policy. It
|
300
|
-
should always be 'default'. "default" Required.
|
301
|
-
:type blob_inventory_policy_name: str or
|
302
|
-
~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicyName
|
303
|
-
:param properties: The blob inventory policy set to a storage account. Required.
|
304
|
-
:type properties: ~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy
|
305
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
|
306
|
-
Default value is "application/json".
|
307
|
-
:paramtype content_type: str
|
308
|
-
:return: BlobInventoryPolicy or the result of cls(response)
|
309
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy
|
310
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
311
|
-
"""
|
312
|
-
|
313
|
-
@overload
|
314
|
-
def create_or_update(
|
315
|
-
self,
|
316
|
-
resource_group_name: str,
|
317
|
-
account_name: str,
|
318
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
319
|
-
properties: IO[bytes],
|
320
|
-
*,
|
321
|
-
content_type: str = "application/json",
|
322
|
-
**kwargs: Any
|
323
|
-
) -> _models.BlobInventoryPolicy:
|
324
|
-
"""Sets the blob inventory policy to the specified storage account.
|
325
|
-
|
326
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
327
|
-
name is case insensitive. Required.
|
328
|
-
:type resource_group_name: str
|
329
|
-
:param account_name: The name of the storage account within the specified resource group.
|
330
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
331
|
-
lower-case letters only. Required.
|
332
|
-
:type account_name: str
|
333
|
-
:param blob_inventory_policy_name: The name of the storage account blob inventory policy. It
|
334
|
-
should always be 'default'. "default" Required.
|
335
|
-
:type blob_inventory_policy_name: str or
|
336
|
-
~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicyName
|
337
|
-
:param properties: The blob inventory policy set to a storage account. Required.
|
338
|
-
:type properties: IO[bytes]
|
339
|
-
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
|
340
|
-
Default value is "application/json".
|
341
|
-
:paramtype content_type: str
|
342
|
-
:return: BlobInventoryPolicy or the result of cls(response)
|
343
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy
|
344
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
345
|
-
"""
|
346
|
-
|
347
|
-
@distributed_trace
|
348
|
-
def create_or_update(
|
349
|
-
self,
|
350
|
-
resource_group_name: str,
|
351
|
-
account_name: str,
|
352
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
353
|
-
properties: Union[_models.BlobInventoryPolicy, IO[bytes]],
|
354
|
-
**kwargs: Any
|
355
|
-
) -> _models.BlobInventoryPolicy:
|
356
|
-
"""Sets the blob inventory policy to the specified storage account.
|
357
|
-
|
358
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
359
|
-
name is case insensitive. Required.
|
360
|
-
:type resource_group_name: str
|
361
|
-
:param account_name: The name of the storage account within the specified resource group.
|
362
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
363
|
-
lower-case letters only. Required.
|
364
|
-
:type account_name: str
|
365
|
-
:param blob_inventory_policy_name: The name of the storage account blob inventory policy. It
|
366
|
-
should always be 'default'. "default" Required.
|
367
|
-
:type blob_inventory_policy_name: str or
|
368
|
-
~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicyName
|
369
|
-
:param properties: The blob inventory policy set to a storage account. Is either a
|
370
|
-
BlobInventoryPolicy type or a IO[bytes] type. Required.
|
371
|
-
:type properties: ~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy or IO[bytes]
|
372
|
-
:return: BlobInventoryPolicy or the result of cls(response)
|
373
|
-
:rtype: ~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy
|
374
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
375
|
-
"""
|
376
|
-
error_map: MutableMapping = {
|
377
|
-
401: ClientAuthenticationError,
|
378
|
-
404: ResourceNotFoundError,
|
379
|
-
409: ResourceExistsError,
|
380
|
-
304: ResourceNotModifiedError,
|
381
|
-
}
|
382
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
383
|
-
|
384
|
-
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
385
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
386
|
-
|
387
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
388
|
-
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
389
|
-
cls: ClsType[_models.BlobInventoryPolicy] = kwargs.pop("cls", None)
|
390
|
-
|
391
|
-
content_type = content_type or "application/json"
|
392
|
-
_json = None
|
393
|
-
_content = None
|
394
|
-
if isinstance(properties, (IOBase, bytes)):
|
395
|
-
_content = properties
|
396
|
-
else:
|
397
|
-
_json = self._serialize.body(properties, "BlobInventoryPolicy")
|
398
|
-
|
399
|
-
_request = build_create_or_update_request(
|
400
|
-
resource_group_name=resource_group_name,
|
401
|
-
account_name=account_name,
|
402
|
-
blob_inventory_policy_name=blob_inventory_policy_name,
|
403
|
-
subscription_id=self._config.subscription_id,
|
404
|
-
api_version=api_version,
|
405
|
-
content_type=content_type,
|
406
|
-
json=_json,
|
407
|
-
content=_content,
|
408
|
-
headers=_headers,
|
409
|
-
params=_params,
|
410
|
-
)
|
411
|
-
_request.url = self._client.format_url(_request.url)
|
412
|
-
|
413
|
-
_stream = False
|
414
|
-
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
415
|
-
_request, stream=_stream, **kwargs
|
416
|
-
)
|
417
|
-
|
418
|
-
response = pipeline_response.http_response
|
419
|
-
|
420
|
-
if response.status_code not in [200]:
|
421
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
422
|
-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
|
423
|
-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
424
|
-
|
425
|
-
deserialized = self._deserialize("BlobInventoryPolicy", pipeline_response.http_response)
|
426
|
-
|
427
|
-
if cls:
|
428
|
-
return cls(pipeline_response, deserialized, {}) # type: ignore
|
429
|
-
|
430
|
-
return deserialized # type: ignore
|
431
|
-
|
432
|
-
@distributed_trace
|
433
|
-
def delete( # pylint: disable=inconsistent-return-statements
|
434
|
-
self,
|
435
|
-
resource_group_name: str,
|
436
|
-
account_name: str,
|
437
|
-
blob_inventory_policy_name: Union[str, _models.BlobInventoryPolicyName],
|
438
|
-
**kwargs: Any
|
439
|
-
) -> None:
|
440
|
-
"""Deletes the blob inventory policy associated with the specified storage account.
|
441
|
-
|
442
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
443
|
-
name is case insensitive. Required.
|
444
|
-
:type resource_group_name: str
|
445
|
-
:param account_name: The name of the storage account within the specified resource group.
|
446
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
447
|
-
lower-case letters only. Required.
|
448
|
-
:type account_name: str
|
449
|
-
:param blob_inventory_policy_name: The name of the storage account blob inventory policy. It
|
450
|
-
should always be 'default'. "default" Required.
|
451
|
-
:type blob_inventory_policy_name: str or
|
452
|
-
~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicyName
|
453
|
-
:return: None or the result of cls(response)
|
454
|
-
:rtype: None
|
455
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
456
|
-
"""
|
457
|
-
error_map: MutableMapping = {
|
458
|
-
401: ClientAuthenticationError,
|
459
|
-
404: ResourceNotFoundError,
|
460
|
-
409: ResourceExistsError,
|
461
|
-
304: ResourceNotModifiedError,
|
462
|
-
}
|
463
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
464
|
-
|
465
|
-
_headers = kwargs.pop("headers", {}) or {}
|
466
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
467
|
-
|
468
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
469
|
-
cls: ClsType[None] = kwargs.pop("cls", None)
|
470
|
-
|
471
|
-
_request = build_delete_request(
|
472
|
-
resource_group_name=resource_group_name,
|
473
|
-
account_name=account_name,
|
474
|
-
blob_inventory_policy_name=blob_inventory_policy_name,
|
475
|
-
subscription_id=self._config.subscription_id,
|
476
|
-
api_version=api_version,
|
477
|
-
headers=_headers,
|
478
|
-
params=_params,
|
479
|
-
)
|
480
|
-
_request.url = self._client.format_url(_request.url)
|
481
|
-
|
482
|
-
_stream = False
|
483
|
-
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
484
|
-
_request, stream=_stream, **kwargs
|
485
|
-
)
|
486
|
-
|
487
|
-
response = pipeline_response.http_response
|
488
|
-
|
489
|
-
if response.status_code not in [200, 204]:
|
490
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
491
|
-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
|
492
|
-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
493
|
-
|
494
|
-
if cls:
|
495
|
-
return cls(pipeline_response, None, {}) # type: ignore
|
496
|
-
|
497
|
-
@distributed_trace
|
498
|
-
def list(
|
499
|
-
self, resource_group_name: str, account_name: str, **kwargs: Any
|
500
|
-
) -> Iterable["_models.BlobInventoryPolicy"]:
|
501
|
-
"""Gets the blob inventory policy associated with the specified storage account.
|
502
|
-
|
503
|
-
:param resource_group_name: The name of the resource group within the user's subscription. The
|
504
|
-
name is case insensitive. Required.
|
505
|
-
:type resource_group_name: str
|
506
|
-
:param account_name: The name of the storage account within the specified resource group.
|
507
|
-
Storage account names must be between 3 and 24 characters in length and use numbers and
|
508
|
-
lower-case letters only. Required.
|
509
|
-
:type account_name: str
|
510
|
-
:return: An iterator like instance of either BlobInventoryPolicy or the result of cls(response)
|
511
|
-
:rtype:
|
512
|
-
~azure.core.paging.ItemPaged[~azure.mgmt.storage.v2019_06_01.models.BlobInventoryPolicy]
|
513
|
-
:raises ~azure.core.exceptions.HttpResponseError:
|
514
|
-
"""
|
515
|
-
_headers = kwargs.pop("headers", {}) or {}
|
516
|
-
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
517
|
-
|
518
|
-
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2019-06-01"))
|
519
|
-
cls: ClsType[_models.ListBlobInventoryPolicy] = kwargs.pop("cls", None)
|
520
|
-
|
521
|
-
error_map: MutableMapping = {
|
522
|
-
401: ClientAuthenticationError,
|
523
|
-
404: ResourceNotFoundError,
|
524
|
-
409: ResourceExistsError,
|
525
|
-
304: ResourceNotModifiedError,
|
526
|
-
}
|
527
|
-
error_map.update(kwargs.pop("error_map", {}) or {})
|
528
|
-
|
529
|
-
def prepare_request(next_link=None):
|
530
|
-
if not next_link:
|
531
|
-
|
532
|
-
_request = build_list_request(
|
533
|
-
resource_group_name=resource_group_name,
|
534
|
-
account_name=account_name,
|
535
|
-
subscription_id=self._config.subscription_id,
|
536
|
-
api_version=api_version,
|
537
|
-
headers=_headers,
|
538
|
-
params=_params,
|
539
|
-
)
|
540
|
-
_request.url = self._client.format_url(_request.url)
|
541
|
-
|
542
|
-
else:
|
543
|
-
# make call to next link with the client's api-version
|
544
|
-
_parsed_next_link = urllib.parse.urlparse(next_link)
|
545
|
-
_next_request_params = case_insensitive_dict(
|
546
|
-
{
|
547
|
-
key: [urllib.parse.quote(v) for v in value]
|
548
|
-
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
|
549
|
-
}
|
550
|
-
)
|
551
|
-
_next_request_params["api-version"] = self._api_version
|
552
|
-
_request = HttpRequest(
|
553
|
-
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
|
554
|
-
)
|
555
|
-
_request.url = self._client.format_url(_request.url)
|
556
|
-
_request.method = "GET"
|
557
|
-
return _request
|
558
|
-
|
559
|
-
def extract_data(pipeline_response):
|
560
|
-
deserialized = self._deserialize("ListBlobInventoryPolicy", pipeline_response)
|
561
|
-
list_of_elem = deserialized.value
|
562
|
-
if cls:
|
563
|
-
list_of_elem = cls(list_of_elem) # type: ignore
|
564
|
-
return None, iter(list_of_elem)
|
565
|
-
|
566
|
-
def get_next(next_link=None):
|
567
|
-
_request = prepare_request(next_link)
|
568
|
-
|
569
|
-
_stream = False
|
570
|
-
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
571
|
-
_request, stream=_stream, **kwargs
|
572
|
-
)
|
573
|
-
response = pipeline_response.http_response
|
574
|
-
|
575
|
-
if response.status_code not in [200]:
|
576
|
-
map_error(status_code=response.status_code, response=response, error_map=error_map)
|
577
|
-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
|
578
|
-
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
|
579
|
-
|
580
|
-
return pipeline_response
|
581
|
-
|
582
|
-
return ItemPaged(get_next, extract_data)
|