azure-storage-blob 12.19.1__py3-none-any.whl → 12.20.0b1__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/storage/blob/__init__.py +7 -5
- azure/storage/blob/_blob_client.py +12 -4
- azure/storage/blob/_blob_service_client.py +4 -3
- azure/storage/blob/_container_client.py +28 -12
- azure/storage/blob/_download.py +3 -3
- azure/storage/blob/_encryption.py +254 -165
- azure/storage/blob/_generated/_azure_blob_storage.py +21 -3
- azure/storage/blob/_generated/_configuration.py +4 -11
- azure/storage/blob/_generated/_serialization.py +41 -49
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +23 -3
- azure/storage/blob/_generated/aio/_configuration.py +4 -11
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +24 -58
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +37 -86
- azure/storage/blob/_generated/aio/operations/_container_operations.py +98 -289
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +51 -150
- azure/storage/blob/_generated/aio/operations/_service_operations.py +49 -125
- azure/storage/blob/_generated/models/_models_py3.py +31 -31
- azure/storage/blob/_generated/operations/_append_blob_operations.py +25 -59
- azure/storage/blob/_generated/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/operations/_block_blob_operations.py +39 -88
- azure/storage/blob/_generated/operations/_container_operations.py +100 -291
- azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -151
- azure/storage/blob/_generated/operations/_service_operations.py +50 -126
- azure/storage/blob/_models.py +3 -4
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/authentication.py +1 -1
- azure/storage/blob/_shared/avro/avro_io.py +0 -6
- azure/storage/blob/_shared/avro/avro_io_async.py +0 -6
- azure/storage/blob/_shared/avro/datafile.py +0 -4
- azure/storage/blob/_shared/avro/datafile_async.py +0 -4
- azure/storage/blob/_shared/avro/schema.py +4 -4
- azure/storage/blob/_shared/base_client.py +72 -87
- azure/storage/blob/_shared/base_client_async.py +115 -27
- azure/storage/blob/_shared/models.py +112 -20
- azure/storage/blob/_shared/parser.py +7 -6
- azure/storage/blob/_shared/policies.py +96 -66
- azure/storage/blob/_shared/policies_async.py +48 -21
- azure/storage/blob/_shared/response_handlers.py +14 -16
- azure/storage/blob/_shared/shared_access_signature.py +2 -3
- azure/storage/blob/_shared_access_signature.py +37 -27
- azure/storage/blob/_upload_helpers.py +4 -7
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +2 -2
- azure/storage/blob/aio/_blob_client_async.py +16 -5
- azure/storage/blob/aio/_blob_service_client_async.py +3 -1
- azure/storage/blob/aio/_container_client_async.py +25 -8
- azure/storage/blob/aio/_download_async.py +9 -9
- azure/storage/blob/aio/_encryption_async.py +72 -0
- azure/storage/blob/aio/_upload_helpers.py +8 -10
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.dist-info}/METADATA +9 -9
- azure_storage_blob-12.20.0b1.dist-info/RECORD +81 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.dist-info}/WHEEL +1 -1
- azure/storage/blob/_generated/py.typed +0 -1
- azure_storage_blob-12.19.1.dist-info/RECORD +0 -81
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.19.1.dist-info → azure_storage_blob-12.20.0b1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines,too-many-statements
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -7,8 +7,7 @@
|
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
9
|
import datetime
|
10
|
-
import
|
11
|
-
from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union
|
10
|
+
from typing import Any, Callable, Dict, IO, Iterator, List, Literal, Optional, TypeVar, Union
|
12
11
|
|
13
12
|
from azure.core.exceptions import (
|
14
13
|
ClientAuthenticationError,
|
@@ -28,10 +27,6 @@ from .. import models as _models
|
|
28
27
|
from .._serialization import Serializer
|
29
28
|
from .._vendor import _convert_request
|
30
29
|
|
31
|
-
if sys.version_info >= (3, 8):
|
32
|
-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
|
33
|
-
else:
|
34
|
-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
|
35
30
|
T = TypeVar("T")
|
36
31
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
37
32
|
|
@@ -412,7 +407,7 @@ def build_submit_batch_request(
|
|
412
407
|
url: str,
|
413
408
|
*,
|
414
409
|
content_length: int,
|
415
|
-
content: IO,
|
410
|
+
content: IO[bytes],
|
416
411
|
timeout: Optional[int] = None,
|
417
412
|
request_id_parameter: Optional[str] = None,
|
418
413
|
**kwargs: Any
|
@@ -799,7 +794,7 @@ def build_list_blob_flat_segment_request(
|
|
799
794
|
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
|
800
795
|
|
801
796
|
|
802
|
-
def build_list_blob_hierarchy_segment_request(
|
797
|
+
def build_list_blob_hierarchy_segment_request( # pylint: disable=name-too-long
|
803
798
|
url: str,
|
804
799
|
*,
|
805
800
|
delimiter: str,
|
@@ -933,10 +928,6 @@ class ContainerOperations:
|
|
933
928
|
:type request_id_parameter: str
|
934
929
|
:param container_cpk_scope_info: Parameter group. Default value is None.
|
935
930
|
:type container_cpk_scope_info: ~azure.storage.blob.models.ContainerCpkScopeInfo
|
936
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
937
|
-
value may result in unsupported behavior.
|
938
|
-
:paramtype restype: str
|
939
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
940
931
|
:return: None or the result of cls(response)
|
941
932
|
:rtype: None
|
942
933
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -961,7 +952,7 @@ class ContainerOperations:
|
|
961
952
|
_default_encryption_scope = container_cpk_scope_info.default_encryption_scope
|
962
953
|
_prevent_encryption_scope_override = container_cpk_scope_info.prevent_encryption_scope_override
|
963
954
|
|
964
|
-
|
955
|
+
_request = build_create_request(
|
965
956
|
url=self._config.url,
|
966
957
|
timeout=timeout,
|
967
958
|
metadata=metadata,
|
@@ -971,16 +962,15 @@ class ContainerOperations:
|
|
971
962
|
prevent_encryption_scope_override=_prevent_encryption_scope_override,
|
972
963
|
restype=restype,
|
973
964
|
version=self._config.version,
|
974
|
-
template_url=self.create.metadata["url"],
|
975
965
|
headers=_headers,
|
976
966
|
params=_params,
|
977
967
|
)
|
978
|
-
|
979
|
-
|
968
|
+
_request = _convert_request(_request)
|
969
|
+
_request.url = self._client.format_url(_request.url)
|
980
970
|
|
981
971
|
_stream = False
|
982
972
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
983
|
-
|
973
|
+
_request, stream=_stream, **kwargs
|
984
974
|
)
|
985
975
|
|
986
976
|
response = pipeline_response.http_response
|
@@ -1001,9 +991,7 @@ class ContainerOperations:
|
|
1001
991
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1002
992
|
|
1003
993
|
if cls:
|
1004
|
-
return cls(pipeline_response, None, response_headers)
|
1005
|
-
|
1006
|
-
create.metadata = {"url": "{url}"}
|
994
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1007
995
|
|
1008
996
|
@distributed_trace
|
1009
997
|
def get_properties( # pylint: disable=inconsistent-return-statements
|
@@ -1027,10 +1015,6 @@ class ContainerOperations:
|
|
1027
1015
|
:type request_id_parameter: str
|
1028
1016
|
:param lease_access_conditions: Parameter group. Default value is None.
|
1029
1017
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1030
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1031
|
-
value may result in unsupported behavior.
|
1032
|
-
:paramtype restype: str
|
1033
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1034
1018
|
:return: None or the result of cls(response)
|
1035
1019
|
:rtype: None
|
1036
1020
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1053,23 +1037,22 @@ class ContainerOperations:
|
|
1053
1037
|
if lease_access_conditions is not None:
|
1054
1038
|
_lease_id = lease_access_conditions.lease_id
|
1055
1039
|
|
1056
|
-
|
1040
|
+
_request = build_get_properties_request(
|
1057
1041
|
url=self._config.url,
|
1058
1042
|
timeout=timeout,
|
1059
1043
|
lease_id=_lease_id,
|
1060
1044
|
request_id_parameter=request_id_parameter,
|
1061
1045
|
restype=restype,
|
1062
1046
|
version=self._config.version,
|
1063
|
-
template_url=self.get_properties.metadata["url"],
|
1064
1047
|
headers=_headers,
|
1065
1048
|
params=_params,
|
1066
1049
|
)
|
1067
|
-
|
1068
|
-
|
1050
|
+
_request = _convert_request(_request)
|
1051
|
+
_request.url = self._client.format_url(_request.url)
|
1069
1052
|
|
1070
1053
|
_stream = False
|
1071
1054
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1072
|
-
|
1055
|
+
_request, stream=_stream, **kwargs
|
1073
1056
|
)
|
1074
1057
|
|
1075
1058
|
response = pipeline_response.http_response
|
@@ -1110,9 +1093,7 @@ class ContainerOperations:
|
|
1110
1093
|
)
|
1111
1094
|
|
1112
1095
|
if cls:
|
1113
|
-
return cls(pipeline_response, None, response_headers)
|
1114
|
-
|
1115
|
-
get_properties.metadata = {"url": "{url}"}
|
1096
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1116
1097
|
|
1117
1098
|
@distributed_trace
|
1118
1099
|
def delete( # pylint: disable=inconsistent-return-statements
|
@@ -1139,10 +1120,6 @@ class ContainerOperations:
|
|
1139
1120
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1140
1121
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1141
1122
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1142
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1143
|
-
value may result in unsupported behavior.
|
1144
|
-
:paramtype restype: str
|
1145
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1146
1123
|
:return: None or the result of cls(response)
|
1147
1124
|
:rtype: None
|
1148
1125
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1170,7 +1147,7 @@ class ContainerOperations:
|
|
1170
1147
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1171
1148
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1172
1149
|
|
1173
|
-
|
1150
|
+
_request = build_delete_request(
|
1174
1151
|
url=self._config.url,
|
1175
1152
|
timeout=timeout,
|
1176
1153
|
lease_id=_lease_id,
|
@@ -1179,16 +1156,15 @@ class ContainerOperations:
|
|
1179
1156
|
request_id_parameter=request_id_parameter,
|
1180
1157
|
restype=restype,
|
1181
1158
|
version=self._config.version,
|
1182
|
-
template_url=self.delete.metadata["url"],
|
1183
1159
|
headers=_headers,
|
1184
1160
|
params=_params,
|
1185
1161
|
)
|
1186
|
-
|
1187
|
-
|
1162
|
+
_request = _convert_request(_request)
|
1163
|
+
_request.url = self._client.format_url(_request.url)
|
1188
1164
|
|
1189
1165
|
_stream = False
|
1190
1166
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1191
|
-
|
1167
|
+
_request, stream=_stream, **kwargs
|
1192
1168
|
)
|
1193
1169
|
|
1194
1170
|
response = pipeline_response.http_response
|
@@ -1207,9 +1183,7 @@ class ContainerOperations:
|
|
1207
1183
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1208
1184
|
|
1209
1185
|
if cls:
|
1210
|
-
return cls(pipeline_response, None, response_headers)
|
1211
|
-
|
1212
|
-
delete.metadata = {"url": "{url}"}
|
1186
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1213
1187
|
|
1214
1188
|
@distributed_trace
|
1215
1189
|
def set_metadata( # pylint: disable=inconsistent-return-statements
|
@@ -1244,13 +1218,6 @@ class ContainerOperations:
|
|
1244
1218
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1245
1219
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1246
1220
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1247
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1248
|
-
value may result in unsupported behavior.
|
1249
|
-
:paramtype restype: str
|
1250
|
-
:keyword comp: comp. Default value is "metadata". Note that overriding this default value may
|
1251
|
-
result in unsupported behavior.
|
1252
|
-
:paramtype comp: str
|
1253
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1254
1221
|
:return: None or the result of cls(response)
|
1255
1222
|
:rtype: None
|
1256
1223
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1277,7 +1244,7 @@ class ContainerOperations:
|
|
1277
1244
|
if modified_access_conditions is not None:
|
1278
1245
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1279
1246
|
|
1280
|
-
|
1247
|
+
_request = build_set_metadata_request(
|
1281
1248
|
url=self._config.url,
|
1282
1249
|
timeout=timeout,
|
1283
1250
|
lease_id=_lease_id,
|
@@ -1287,16 +1254,15 @@ class ContainerOperations:
|
|
1287
1254
|
restype=restype,
|
1288
1255
|
comp=comp,
|
1289
1256
|
version=self._config.version,
|
1290
|
-
template_url=self.set_metadata.metadata["url"],
|
1291
1257
|
headers=_headers,
|
1292
1258
|
params=_params,
|
1293
1259
|
)
|
1294
|
-
|
1295
|
-
|
1260
|
+
_request = _convert_request(_request)
|
1261
|
+
_request.url = self._client.format_url(_request.url)
|
1296
1262
|
|
1297
1263
|
_stream = False
|
1298
1264
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1299
|
-
|
1265
|
+
_request, stream=_stream, **kwargs
|
1300
1266
|
)
|
1301
1267
|
|
1302
1268
|
response = pipeline_response.http_response
|
@@ -1317,9 +1283,7 @@ class ContainerOperations:
|
|
1317
1283
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1318
1284
|
|
1319
1285
|
if cls:
|
1320
|
-
return cls(pipeline_response, None, response_headers)
|
1321
|
-
|
1322
|
-
set_metadata.metadata = {"url": "{url}"}
|
1286
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1323
1287
|
|
1324
1288
|
@distributed_trace
|
1325
1289
|
def get_access_policy(
|
@@ -1343,13 +1307,6 @@ class ContainerOperations:
|
|
1343
1307
|
:type request_id_parameter: str
|
1344
1308
|
:param lease_access_conditions: Parameter group. Default value is None.
|
1345
1309
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
1346
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1347
|
-
value may result in unsupported behavior.
|
1348
|
-
:paramtype restype: str
|
1349
|
-
:keyword comp: comp. Default value is "acl". Note that overriding this default value may result
|
1350
|
-
in unsupported behavior.
|
1351
|
-
:paramtype comp: str
|
1352
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1353
1310
|
:return: list of SignedIdentifier or the result of cls(response)
|
1354
1311
|
:rtype: list[~azure.storage.blob.models.SignedIdentifier]
|
1355
1312
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1373,7 +1330,7 @@ class ContainerOperations:
|
|
1373
1330
|
if lease_access_conditions is not None:
|
1374
1331
|
_lease_id = lease_access_conditions.lease_id
|
1375
1332
|
|
1376
|
-
|
1333
|
+
_request = build_get_access_policy_request(
|
1377
1334
|
url=self._config.url,
|
1378
1335
|
timeout=timeout,
|
1379
1336
|
lease_id=_lease_id,
|
@@ -1381,16 +1338,15 @@ class ContainerOperations:
|
|
1381
1338
|
restype=restype,
|
1382
1339
|
comp=comp,
|
1383
1340
|
version=self._config.version,
|
1384
|
-
template_url=self.get_access_policy.metadata["url"],
|
1385
1341
|
headers=_headers,
|
1386
1342
|
params=_params,
|
1387
1343
|
)
|
1388
|
-
|
1389
|
-
|
1344
|
+
_request = _convert_request(_request)
|
1345
|
+
_request.url = self._client.format_url(_request.url)
|
1390
1346
|
|
1391
1347
|
_stream = False
|
1392
1348
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1393
|
-
|
1349
|
+
_request, stream=_stream, **kwargs
|
1394
1350
|
)
|
1395
1351
|
|
1396
1352
|
response = pipeline_response.http_response
|
@@ -1416,11 +1372,9 @@ class ContainerOperations:
|
|
1416
1372
|
deserialized = self._deserialize("[SignedIdentifier]", pipeline_response)
|
1417
1373
|
|
1418
1374
|
if cls:
|
1419
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1420
|
-
|
1421
|
-
return deserialized
|
1375
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1422
1376
|
|
1423
|
-
|
1377
|
+
return deserialized # type: ignore
|
1424
1378
|
|
1425
1379
|
@distributed_trace
|
1426
1380
|
def set_access_policy( # pylint: disable=inconsistent-return-statements
|
@@ -1454,13 +1408,6 @@ class ContainerOperations:
|
|
1454
1408
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1455
1409
|
:param container_acl: the acls for the container. Default value is None.
|
1456
1410
|
:type container_acl: list[~azure.storage.blob.models.SignedIdentifier]
|
1457
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1458
|
-
value may result in unsupported behavior.
|
1459
|
-
:paramtype restype: str
|
1460
|
-
:keyword comp: comp. Default value is "acl". Note that overriding this default value may result
|
1461
|
-
in unsupported behavior.
|
1462
|
-
:paramtype comp: str
|
1463
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1464
1411
|
:return: None or the result of cls(response)
|
1465
1412
|
:rtype: None
|
1466
1413
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1497,7 +1444,7 @@ class ContainerOperations:
|
|
1497
1444
|
else:
|
1498
1445
|
_content = None
|
1499
1446
|
|
1500
|
-
|
1447
|
+
_request = build_set_access_policy_request(
|
1501
1448
|
url=self._config.url,
|
1502
1449
|
timeout=timeout,
|
1503
1450
|
lease_id=_lease_id,
|
@@ -1510,16 +1457,15 @@ class ContainerOperations:
|
|
1510
1457
|
content_type=content_type,
|
1511
1458
|
version=self._config.version,
|
1512
1459
|
content=_content,
|
1513
|
-
template_url=self.set_access_policy.metadata["url"],
|
1514
1460
|
headers=_headers,
|
1515
1461
|
params=_params,
|
1516
1462
|
)
|
1517
|
-
|
1518
|
-
|
1463
|
+
_request = _convert_request(_request)
|
1464
|
+
_request.url = self._client.format_url(_request.url)
|
1519
1465
|
|
1520
1466
|
_stream = False
|
1521
1467
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1522
|
-
|
1468
|
+
_request, stream=_stream, **kwargs
|
1523
1469
|
)
|
1524
1470
|
|
1525
1471
|
response = pipeline_response.http_response
|
@@ -1540,9 +1486,7 @@ class ContainerOperations:
|
|
1540
1486
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1541
1487
|
|
1542
1488
|
if cls:
|
1543
|
-
return cls(pipeline_response, None, response_headers)
|
1544
|
-
|
1545
|
-
set_access_policy.metadata = {"url": "{url}"}
|
1489
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1546
1490
|
|
1547
1491
|
@distributed_trace
|
1548
1492
|
def restore( # pylint: disable=inconsistent-return-statements
|
@@ -1570,13 +1514,6 @@ class ContainerOperations:
|
|
1570
1514
|
:param deleted_container_version: Optional. Version 2019-12-12 and later. Specifies the
|
1571
1515
|
version of the deleted container to restore. Default value is None.
|
1572
1516
|
:type deleted_container_version: str
|
1573
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1574
|
-
value may result in unsupported behavior.
|
1575
|
-
:paramtype restype: str
|
1576
|
-
:keyword comp: comp. Default value is "undelete". Note that overriding this default value may
|
1577
|
-
result in unsupported behavior.
|
1578
|
-
:paramtype comp: str
|
1579
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1580
1517
|
:return: None or the result of cls(response)
|
1581
1518
|
:rtype: None
|
1582
1519
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1596,7 +1533,7 @@ class ContainerOperations:
|
|
1596
1533
|
comp: Literal["undelete"] = kwargs.pop("comp", _params.pop("comp", "undelete"))
|
1597
1534
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
1598
1535
|
|
1599
|
-
|
1536
|
+
_request = build_restore_request(
|
1600
1537
|
url=self._config.url,
|
1601
1538
|
timeout=timeout,
|
1602
1539
|
request_id_parameter=request_id_parameter,
|
@@ -1605,16 +1542,15 @@ class ContainerOperations:
|
|
1605
1542
|
restype=restype,
|
1606
1543
|
comp=comp,
|
1607
1544
|
version=self._config.version,
|
1608
|
-
template_url=self.restore.metadata["url"],
|
1609
1545
|
headers=_headers,
|
1610
1546
|
params=_params,
|
1611
1547
|
)
|
1612
|
-
|
1613
|
-
|
1548
|
+
_request = _convert_request(_request)
|
1549
|
+
_request.url = self._client.format_url(_request.url)
|
1614
1550
|
|
1615
1551
|
_stream = False
|
1616
1552
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1617
|
-
|
1553
|
+
_request, stream=_stream, **kwargs
|
1618
1554
|
)
|
1619
1555
|
|
1620
1556
|
response = pipeline_response.http_response
|
@@ -1633,9 +1569,7 @@ class ContainerOperations:
|
|
1633
1569
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1634
1570
|
|
1635
1571
|
if cls:
|
1636
|
-
return cls(pipeline_response, None, response_headers)
|
1637
|
-
|
1638
|
-
restore.metadata = {"url": "{url}"}
|
1572
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1639
1573
|
|
1640
1574
|
@distributed_trace
|
1641
1575
|
def rename( # pylint: disable=inconsistent-return-statements
|
@@ -1663,13 +1597,6 @@ class ContainerOperations:
|
|
1663
1597
|
:param source_lease_id: A lease ID for the source path. If specified, the source path must have
|
1664
1598
|
an active lease and the lease ID must match. Default value is None.
|
1665
1599
|
:type source_lease_id: str
|
1666
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1667
|
-
value may result in unsupported behavior.
|
1668
|
-
:paramtype restype: str
|
1669
|
-
:keyword comp: comp. Default value is "rename". Note that overriding this default value may
|
1670
|
-
result in unsupported behavior.
|
1671
|
-
:paramtype comp: str
|
1672
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1673
1600
|
:return: None or the result of cls(response)
|
1674
1601
|
:rtype: None
|
1675
1602
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1689,7 +1616,7 @@ class ContainerOperations:
|
|
1689
1616
|
comp: Literal["rename"] = kwargs.pop("comp", _params.pop("comp", "rename"))
|
1690
1617
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
1691
1618
|
|
1692
|
-
|
1619
|
+
_request = build_rename_request(
|
1693
1620
|
url=self._config.url,
|
1694
1621
|
source_container_name=source_container_name,
|
1695
1622
|
timeout=timeout,
|
@@ -1698,16 +1625,15 @@ class ContainerOperations:
|
|
1698
1625
|
restype=restype,
|
1699
1626
|
comp=comp,
|
1700
1627
|
version=self._config.version,
|
1701
|
-
template_url=self.rename.metadata["url"],
|
1702
1628
|
headers=_headers,
|
1703
1629
|
params=_params,
|
1704
1630
|
)
|
1705
|
-
|
1706
|
-
|
1631
|
+
_request = _convert_request(_request)
|
1632
|
+
_request.url = self._client.format_url(_request.url)
|
1707
1633
|
|
1708
1634
|
_stream = False
|
1709
1635
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1710
|
-
|
1636
|
+
_request, stream=_stream, **kwargs
|
1711
1637
|
)
|
1712
1638
|
|
1713
1639
|
response = pipeline_response.http_response
|
@@ -1726,15 +1652,13 @@ class ContainerOperations:
|
|
1726
1652
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1727
1653
|
|
1728
1654
|
if cls:
|
1729
|
-
return cls(pipeline_response, None, response_headers)
|
1730
|
-
|
1731
|
-
rename.metadata = {"url": "{url}"}
|
1655
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1732
1656
|
|
1733
1657
|
@distributed_trace
|
1734
1658
|
def submit_batch(
|
1735
1659
|
self,
|
1736
1660
|
content_length: int,
|
1737
|
-
body: IO,
|
1661
|
+
body: IO[bytes],
|
1738
1662
|
timeout: Optional[int] = None,
|
1739
1663
|
request_id_parameter: Optional[str] = None,
|
1740
1664
|
**kwargs: Any
|
@@ -1744,7 +1668,7 @@ class ContainerOperations:
|
|
1744
1668
|
:param content_length: The length of the request. Required.
|
1745
1669
|
:type content_length: int
|
1746
1670
|
:param body: Initial data. Required.
|
1747
|
-
:type body: IO
|
1671
|
+
:type body: IO[bytes]
|
1748
1672
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1749
1673
|
:code:`<a
|
1750
1674
|
href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
|
@@ -1754,14 +1678,7 @@ class ContainerOperations:
|
|
1754
1678
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
1755
1679
|
value is None.
|
1756
1680
|
:type request_id_parameter: str
|
1757
|
-
:
|
1758
|
-
value may result in unsupported behavior.
|
1759
|
-
:paramtype restype: str
|
1760
|
-
:keyword comp: comp. Default value is "batch". Note that overriding this default value may
|
1761
|
-
result in unsupported behavior.
|
1762
|
-
:paramtype comp: str
|
1763
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1764
|
-
:return: Iterator of the response bytes or the result of cls(response)
|
1681
|
+
:return: Iterator[bytes] or the result of cls(response)
|
1765
1682
|
:rtype: Iterator[bytes]
|
1766
1683
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1767
1684
|
"""
|
@@ -1785,7 +1702,7 @@ class ContainerOperations:
|
|
1785
1702
|
|
1786
1703
|
_content = body
|
1787
1704
|
|
1788
|
-
|
1705
|
+
_request = build_submit_batch_request(
|
1789
1706
|
url=self._config.url,
|
1790
1707
|
content_length=content_length,
|
1791
1708
|
timeout=timeout,
|
@@ -1795,16 +1712,15 @@ class ContainerOperations:
|
|
1795
1712
|
multipart_content_type=multipart_content_type,
|
1796
1713
|
version=self._config.version,
|
1797
1714
|
content=_content,
|
1798
|
-
template_url=self.submit_batch.metadata["url"],
|
1799
1715
|
headers=_headers,
|
1800
1716
|
params=_params,
|
1801
1717
|
)
|
1802
|
-
|
1803
|
-
|
1718
|
+
_request = _convert_request(_request)
|
1719
|
+
_request.url = self._client.format_url(_request.url)
|
1804
1720
|
|
1805
1721
|
_stream = True
|
1806
1722
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1807
|
-
|
1723
|
+
_request, stream=_stream, **kwargs
|
1808
1724
|
)
|
1809
1725
|
|
1810
1726
|
response = pipeline_response.http_response
|
@@ -1826,8 +1742,6 @@ class ContainerOperations:
|
|
1826
1742
|
|
1827
1743
|
return deserialized # type: ignore
|
1828
1744
|
|
1829
|
-
submit_batch.metadata = {"url": "{url}"}
|
1830
|
-
|
1831
1745
|
@distributed_trace
|
1832
1746
|
def filter_blobs(
|
1833
1747
|
self,
|
@@ -1871,13 +1785,6 @@ class ContainerOperations:
|
|
1871
1785
|
:param include: Include this parameter to specify one or more datasets to include in the
|
1872
1786
|
response. Default value is None.
|
1873
1787
|
:type include: list[str or ~azure.storage.blob.models.FilterBlobsIncludeItem]
|
1874
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1875
|
-
value may result in unsupported behavior.
|
1876
|
-
:paramtype restype: str
|
1877
|
-
:keyword comp: comp. Default value is "blobs". Note that overriding this default value may
|
1878
|
-
result in unsupported behavior.
|
1879
|
-
:paramtype comp: str
|
1880
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1881
1788
|
:return: FilterBlobSegment or the result of cls(response)
|
1882
1789
|
:rtype: ~azure.storage.blob.models.FilterBlobSegment
|
1883
1790
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1897,7 +1804,7 @@ class ContainerOperations:
|
|
1897
1804
|
comp: Literal["blobs"] = kwargs.pop("comp", _params.pop("comp", "blobs"))
|
1898
1805
|
cls: ClsType[_models.FilterBlobSegment] = kwargs.pop("cls", None)
|
1899
1806
|
|
1900
|
-
|
1807
|
+
_request = build_filter_blobs_request(
|
1901
1808
|
url=self._config.url,
|
1902
1809
|
timeout=timeout,
|
1903
1810
|
request_id_parameter=request_id_parameter,
|
@@ -1908,16 +1815,15 @@ class ContainerOperations:
|
|
1908
1815
|
restype=restype,
|
1909
1816
|
comp=comp,
|
1910
1817
|
version=self._config.version,
|
1911
|
-
template_url=self.filter_blobs.metadata["url"],
|
1912
1818
|
headers=_headers,
|
1913
1819
|
params=_params,
|
1914
1820
|
)
|
1915
|
-
|
1916
|
-
|
1821
|
+
_request = _convert_request(_request)
|
1822
|
+
_request.url = self._client.format_url(_request.url)
|
1917
1823
|
|
1918
1824
|
_stream = False
|
1919
1825
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
1920
|
-
|
1826
|
+
_request, stream=_stream, **kwargs
|
1921
1827
|
)
|
1922
1828
|
|
1923
1829
|
response = pipeline_response.http_response
|
@@ -1938,11 +1844,9 @@ class ContainerOperations:
|
|
1938
1844
|
deserialized = self._deserialize("FilterBlobSegment", pipeline_response)
|
1939
1845
|
|
1940
1846
|
if cls:
|
1941
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1942
|
-
|
1943
|
-
return deserialized
|
1847
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1944
1848
|
|
1945
|
-
|
1849
|
+
return deserialized # type: ignore
|
1946
1850
|
|
1947
1851
|
@distributed_trace
|
1948
1852
|
def acquire_lease( # pylint: disable=inconsistent-return-statements
|
@@ -1976,16 +1880,6 @@ class ContainerOperations:
|
|
1976
1880
|
:type request_id_parameter: str
|
1977
1881
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1978
1882
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1979
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
1980
|
-
result in unsupported behavior.
|
1981
|
-
:paramtype comp: str
|
1982
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1983
|
-
value may result in unsupported behavior.
|
1984
|
-
:paramtype restype: str
|
1985
|
-
:keyword action: Describes what lease action to take. Default value is "acquire". Note that
|
1986
|
-
overriding this default value may result in unsupported behavior.
|
1987
|
-
:paramtype action: str
|
1988
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1989
1883
|
:return: None or the result of cls(response)
|
1990
1884
|
:rtype: None
|
1991
1885
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2012,7 +1906,7 @@ class ContainerOperations:
|
|
2012
1906
|
_if_modified_since = modified_access_conditions.if_modified_since
|
2013
1907
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2014
1908
|
|
2015
|
-
|
1909
|
+
_request = build_acquire_lease_request(
|
2016
1910
|
url=self._config.url,
|
2017
1911
|
timeout=timeout,
|
2018
1912
|
duration=duration,
|
@@ -2024,16 +1918,15 @@ class ContainerOperations:
|
|
2024
1918
|
restype=restype,
|
2025
1919
|
action=action,
|
2026
1920
|
version=self._config.version,
|
2027
|
-
template_url=self.acquire_lease.metadata["url"],
|
2028
1921
|
headers=_headers,
|
2029
1922
|
params=_params,
|
2030
1923
|
)
|
2031
|
-
|
2032
|
-
|
1924
|
+
_request = _convert_request(_request)
|
1925
|
+
_request.url = self._client.format_url(_request.url)
|
2033
1926
|
|
2034
1927
|
_stream = False
|
2035
1928
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2036
|
-
|
1929
|
+
_request, stream=_stream, **kwargs
|
2037
1930
|
)
|
2038
1931
|
|
2039
1932
|
response = pipeline_response.http_response
|
@@ -2055,9 +1948,7 @@ class ContainerOperations:
|
|
2055
1948
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2056
1949
|
|
2057
1950
|
if cls:
|
2058
|
-
return cls(pipeline_response, None, response_headers)
|
2059
|
-
|
2060
|
-
acquire_lease.metadata = {"url": "{url}"}
|
1951
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2061
1952
|
|
2062
1953
|
@distributed_trace
|
2063
1954
|
def release_lease( # pylint: disable=inconsistent-return-statements
|
@@ -2084,16 +1975,6 @@ class ContainerOperations:
|
|
2084
1975
|
:type request_id_parameter: str
|
2085
1976
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2086
1977
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2087
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
2088
|
-
result in unsupported behavior.
|
2089
|
-
:paramtype comp: str
|
2090
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
2091
|
-
value may result in unsupported behavior.
|
2092
|
-
:paramtype restype: str
|
2093
|
-
:keyword action: Describes what lease action to take. Default value is "release". Note that
|
2094
|
-
overriding this default value may result in unsupported behavior.
|
2095
|
-
:paramtype action: str
|
2096
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2097
1978
|
:return: None or the result of cls(response)
|
2098
1979
|
:rtype: None
|
2099
1980
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2120,7 +2001,7 @@ class ContainerOperations:
|
|
2120
2001
|
_if_modified_since = modified_access_conditions.if_modified_since
|
2121
2002
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2122
2003
|
|
2123
|
-
|
2004
|
+
_request = build_release_lease_request(
|
2124
2005
|
url=self._config.url,
|
2125
2006
|
lease_id=lease_id,
|
2126
2007
|
timeout=timeout,
|
@@ -2131,16 +2012,15 @@ class ContainerOperations:
|
|
2131
2012
|
restype=restype,
|
2132
2013
|
action=action,
|
2133
2014
|
version=self._config.version,
|
2134
|
-
template_url=self.release_lease.metadata["url"],
|
2135
2015
|
headers=_headers,
|
2136
2016
|
params=_params,
|
2137
2017
|
)
|
2138
|
-
|
2139
|
-
|
2018
|
+
_request = _convert_request(_request)
|
2019
|
+
_request.url = self._client.format_url(_request.url)
|
2140
2020
|
|
2141
2021
|
_stream = False
|
2142
2022
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2143
|
-
|
2023
|
+
_request, stream=_stream, **kwargs
|
2144
2024
|
)
|
2145
2025
|
|
2146
2026
|
response = pipeline_response.http_response
|
@@ -2161,9 +2041,7 @@ class ContainerOperations:
|
|
2161
2041
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2162
2042
|
|
2163
2043
|
if cls:
|
2164
|
-
return cls(pipeline_response, None, response_headers)
|
2165
|
-
|
2166
|
-
release_lease.metadata = {"url": "{url}"}
|
2044
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2167
2045
|
|
2168
2046
|
@distributed_trace
|
2169
2047
|
def renew_lease( # pylint: disable=inconsistent-return-statements
|
@@ -2190,16 +2068,6 @@ class ContainerOperations:
|
|
2190
2068
|
:type request_id_parameter: str
|
2191
2069
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2192
2070
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2193
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
2194
|
-
result in unsupported behavior.
|
2195
|
-
:paramtype comp: str
|
2196
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
2197
|
-
value may result in unsupported behavior.
|
2198
|
-
:paramtype restype: str
|
2199
|
-
:keyword action: Describes what lease action to take. Default value is "renew". Note that
|
2200
|
-
overriding this default value may result in unsupported behavior.
|
2201
|
-
:paramtype action: str
|
2202
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2203
2071
|
:return: None or the result of cls(response)
|
2204
2072
|
:rtype: None
|
2205
2073
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2226,7 +2094,7 @@ class ContainerOperations:
|
|
2226
2094
|
_if_modified_since = modified_access_conditions.if_modified_since
|
2227
2095
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2228
2096
|
|
2229
|
-
|
2097
|
+
_request = build_renew_lease_request(
|
2230
2098
|
url=self._config.url,
|
2231
2099
|
lease_id=lease_id,
|
2232
2100
|
timeout=timeout,
|
@@ -2237,16 +2105,15 @@ class ContainerOperations:
|
|
2237
2105
|
restype=restype,
|
2238
2106
|
action=action,
|
2239
2107
|
version=self._config.version,
|
2240
|
-
template_url=self.renew_lease.metadata["url"],
|
2241
2108
|
headers=_headers,
|
2242
2109
|
params=_params,
|
2243
2110
|
)
|
2244
|
-
|
2245
|
-
|
2111
|
+
_request = _convert_request(_request)
|
2112
|
+
_request.url = self._client.format_url(_request.url)
|
2246
2113
|
|
2247
2114
|
_stream = False
|
2248
2115
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2249
|
-
|
2116
|
+
_request, stream=_stream, **kwargs
|
2250
2117
|
)
|
2251
2118
|
|
2252
2119
|
response = pipeline_response.http_response
|
@@ -2268,9 +2135,7 @@ class ContainerOperations:
|
|
2268
2135
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2269
2136
|
|
2270
2137
|
if cls:
|
2271
|
-
return cls(pipeline_response, None, response_headers)
|
2272
|
-
|
2273
|
-
renew_lease.metadata = {"url": "{url}"}
|
2138
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2274
2139
|
|
2275
2140
|
@distributed_trace
|
2276
2141
|
def break_lease( # pylint: disable=inconsistent-return-statements
|
@@ -2303,16 +2168,6 @@ class ContainerOperations:
|
|
2303
2168
|
:type request_id_parameter: str
|
2304
2169
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2305
2170
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2306
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
2307
|
-
result in unsupported behavior.
|
2308
|
-
:paramtype comp: str
|
2309
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
2310
|
-
value may result in unsupported behavior.
|
2311
|
-
:paramtype restype: str
|
2312
|
-
:keyword action: Describes what lease action to take. Default value is "break". Note that
|
2313
|
-
overriding this default value may result in unsupported behavior.
|
2314
|
-
:paramtype action: str
|
2315
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2316
2171
|
:return: None or the result of cls(response)
|
2317
2172
|
:rtype: None
|
2318
2173
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2339,7 +2194,7 @@ class ContainerOperations:
|
|
2339
2194
|
_if_modified_since = modified_access_conditions.if_modified_since
|
2340
2195
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2341
2196
|
|
2342
|
-
|
2197
|
+
_request = build_break_lease_request(
|
2343
2198
|
url=self._config.url,
|
2344
2199
|
timeout=timeout,
|
2345
2200
|
break_period=break_period,
|
@@ -2350,16 +2205,15 @@ class ContainerOperations:
|
|
2350
2205
|
restype=restype,
|
2351
2206
|
action=action,
|
2352
2207
|
version=self._config.version,
|
2353
|
-
template_url=self.break_lease.metadata["url"],
|
2354
2208
|
headers=_headers,
|
2355
2209
|
params=_params,
|
2356
2210
|
)
|
2357
|
-
|
2358
|
-
|
2211
|
+
_request = _convert_request(_request)
|
2212
|
+
_request.url = self._client.format_url(_request.url)
|
2359
2213
|
|
2360
2214
|
_stream = False
|
2361
2215
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2362
|
-
|
2216
|
+
_request, stream=_stream, **kwargs
|
2363
2217
|
)
|
2364
2218
|
|
2365
2219
|
response = pipeline_response.http_response
|
@@ -2381,9 +2235,7 @@ class ContainerOperations:
|
|
2381
2235
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2382
2236
|
|
2383
2237
|
if cls:
|
2384
|
-
return cls(pipeline_response, None, response_headers)
|
2385
|
-
|
2386
|
-
break_lease.metadata = {"url": "{url}"}
|
2238
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2387
2239
|
|
2388
2240
|
@distributed_trace
|
2389
2241
|
def change_lease( # pylint: disable=inconsistent-return-statements
|
@@ -2415,16 +2267,6 @@ class ContainerOperations:
|
|
2415
2267
|
:type request_id_parameter: str
|
2416
2268
|
:param modified_access_conditions: Parameter group. Default value is None.
|
2417
2269
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
2418
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
2419
|
-
result in unsupported behavior.
|
2420
|
-
:paramtype comp: str
|
2421
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
2422
|
-
value may result in unsupported behavior.
|
2423
|
-
:paramtype restype: str
|
2424
|
-
:keyword action: Describes what lease action to take. Default value is "change". Note that
|
2425
|
-
overriding this default value may result in unsupported behavior.
|
2426
|
-
:paramtype action: str
|
2427
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2428
2270
|
:return: None or the result of cls(response)
|
2429
2271
|
:rtype: None
|
2430
2272
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2451,7 +2293,7 @@ class ContainerOperations:
|
|
2451
2293
|
_if_modified_since = modified_access_conditions.if_modified_since
|
2452
2294
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
2453
2295
|
|
2454
|
-
|
2296
|
+
_request = build_change_lease_request(
|
2455
2297
|
url=self._config.url,
|
2456
2298
|
lease_id=lease_id,
|
2457
2299
|
proposed_lease_id=proposed_lease_id,
|
@@ -2463,16 +2305,15 @@ class ContainerOperations:
|
|
2463
2305
|
restype=restype,
|
2464
2306
|
action=action,
|
2465
2307
|
version=self._config.version,
|
2466
|
-
template_url=self.change_lease.metadata["url"],
|
2467
2308
|
headers=_headers,
|
2468
2309
|
params=_params,
|
2469
2310
|
)
|
2470
|
-
|
2471
|
-
|
2311
|
+
_request = _convert_request(_request)
|
2312
|
+
_request.url = self._client.format_url(_request.url)
|
2472
2313
|
|
2473
2314
|
_stream = False
|
2474
2315
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2475
|
-
|
2316
|
+
_request, stream=_stream, **kwargs
|
2476
2317
|
)
|
2477
2318
|
|
2478
2319
|
response = pipeline_response.http_response
|
@@ -2494,9 +2335,7 @@ class ContainerOperations:
|
|
2494
2335
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
2495
2336
|
|
2496
2337
|
if cls:
|
2497
|
-
return cls(pipeline_response, None, response_headers)
|
2498
|
-
|
2499
|
-
change_lease.metadata = {"url": "{url}"}
|
2338
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
2500
2339
|
|
2501
2340
|
@distributed_trace
|
2502
2341
|
def list_blob_flat_segment(
|
@@ -2540,13 +2379,6 @@ class ContainerOperations:
|
|
2540
2379
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2541
2380
|
value is None.
|
2542
2381
|
:type request_id_parameter: str
|
2543
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
2544
|
-
value may result in unsupported behavior.
|
2545
|
-
:paramtype restype: str
|
2546
|
-
:keyword comp: comp. Default value is "list". Note that overriding this default value may
|
2547
|
-
result in unsupported behavior.
|
2548
|
-
:paramtype comp: str
|
2549
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2550
2382
|
:return: ListBlobsFlatSegmentResponse or the result of cls(response)
|
2551
2383
|
:rtype: ~azure.storage.blob.models.ListBlobsFlatSegmentResponse
|
2552
2384
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2566,7 +2398,7 @@ class ContainerOperations:
|
|
2566
2398
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
2567
2399
|
cls: ClsType[_models.ListBlobsFlatSegmentResponse] = kwargs.pop("cls", None)
|
2568
2400
|
|
2569
|
-
|
2401
|
+
_request = build_list_blob_flat_segment_request(
|
2570
2402
|
url=self._config.url,
|
2571
2403
|
prefix=prefix,
|
2572
2404
|
marker=marker,
|
@@ -2577,16 +2409,15 @@ class ContainerOperations:
|
|
2577
2409
|
restype=restype,
|
2578
2410
|
comp=comp,
|
2579
2411
|
version=self._config.version,
|
2580
|
-
template_url=self.list_blob_flat_segment.metadata["url"],
|
2581
2412
|
headers=_headers,
|
2582
2413
|
params=_params,
|
2583
2414
|
)
|
2584
|
-
|
2585
|
-
|
2415
|
+
_request = _convert_request(_request)
|
2416
|
+
_request.url = self._client.format_url(_request.url)
|
2586
2417
|
|
2587
2418
|
_stream = False
|
2588
2419
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2589
|
-
|
2420
|
+
_request, stream=_stream, **kwargs
|
2590
2421
|
)
|
2591
2422
|
|
2592
2423
|
response = pipeline_response.http_response
|
@@ -2608,11 +2439,9 @@ class ContainerOperations:
|
|
2608
2439
|
deserialized = self._deserialize("ListBlobsFlatSegmentResponse", pipeline_response)
|
2609
2440
|
|
2610
2441
|
if cls:
|
2611
|
-
return cls(pipeline_response, deserialized, response_headers)
|
2612
|
-
|
2613
|
-
return deserialized
|
2442
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
2614
2443
|
|
2615
|
-
|
2444
|
+
return deserialized # type: ignore
|
2616
2445
|
|
2617
2446
|
@distributed_trace
|
2618
2447
|
def list_blob_hierarchy_segment(
|
@@ -2662,13 +2491,6 @@ class ContainerOperations:
|
|
2662
2491
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
2663
2492
|
value is None.
|
2664
2493
|
:type request_id_parameter: str
|
2665
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
2666
|
-
value may result in unsupported behavior.
|
2667
|
-
:paramtype restype: str
|
2668
|
-
:keyword comp: comp. Default value is "list". Note that overriding this default value may
|
2669
|
-
result in unsupported behavior.
|
2670
|
-
:paramtype comp: str
|
2671
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2672
2494
|
:return: ListBlobsHierarchySegmentResponse or the result of cls(response)
|
2673
2495
|
:rtype: ~azure.storage.blob.models.ListBlobsHierarchySegmentResponse
|
2674
2496
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2688,7 +2510,7 @@ class ContainerOperations:
|
|
2688
2510
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
2689
2511
|
cls: ClsType[_models.ListBlobsHierarchySegmentResponse] = kwargs.pop("cls", None)
|
2690
2512
|
|
2691
|
-
|
2513
|
+
_request = build_list_blob_hierarchy_segment_request(
|
2692
2514
|
url=self._config.url,
|
2693
2515
|
delimiter=delimiter,
|
2694
2516
|
prefix=prefix,
|
@@ -2700,16 +2522,15 @@ class ContainerOperations:
|
|
2700
2522
|
restype=restype,
|
2701
2523
|
comp=comp,
|
2702
2524
|
version=self._config.version,
|
2703
|
-
template_url=self.list_blob_hierarchy_segment.metadata["url"],
|
2704
2525
|
headers=_headers,
|
2705
2526
|
params=_params,
|
2706
2527
|
)
|
2707
|
-
|
2708
|
-
|
2528
|
+
_request = _convert_request(_request)
|
2529
|
+
_request.url = self._client.format_url(_request.url)
|
2709
2530
|
|
2710
2531
|
_stream = False
|
2711
2532
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2712
|
-
|
2533
|
+
_request, stream=_stream, **kwargs
|
2713
2534
|
)
|
2714
2535
|
|
2715
2536
|
response = pipeline_response.http_response
|
@@ -2731,23 +2552,14 @@ class ContainerOperations:
|
|
2731
2552
|
deserialized = self._deserialize("ListBlobsHierarchySegmentResponse", pipeline_response)
|
2732
2553
|
|
2733
2554
|
if cls:
|
2734
|
-
return cls(pipeline_response, deserialized, response_headers)
|
2735
|
-
|
2736
|
-
return deserialized
|
2555
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
2737
2556
|
|
2738
|
-
|
2557
|
+
return deserialized # type: ignore
|
2739
2558
|
|
2740
2559
|
@distributed_trace
|
2741
2560
|
def get_account_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
|
2742
2561
|
"""Returns the sku name and account kind.
|
2743
2562
|
|
2744
|
-
:keyword restype: restype. Default value is "account". Note that overriding this default value
|
2745
|
-
may result in unsupported behavior.
|
2746
|
-
:paramtype restype: str
|
2747
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
2748
|
-
result in unsupported behavior.
|
2749
|
-
:paramtype comp: str
|
2750
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
2751
2563
|
:return: None or the result of cls(response)
|
2752
2564
|
:rtype: None
|
2753
2565
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -2767,21 +2579,20 @@ class ContainerOperations:
|
|
2767
2579
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
2768
2580
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
2769
2581
|
|
2770
|
-
|
2582
|
+
_request = build_get_account_info_request(
|
2771
2583
|
url=self._config.url,
|
2772
2584
|
restype=restype,
|
2773
2585
|
comp=comp,
|
2774
2586
|
version=self._config.version,
|
2775
|
-
template_url=self.get_account_info.metadata["url"],
|
2776
2587
|
headers=_headers,
|
2777
2588
|
params=_params,
|
2778
2589
|
)
|
2779
|
-
|
2780
|
-
|
2590
|
+
_request = _convert_request(_request)
|
2591
|
+
_request.url = self._client.format_url(_request.url)
|
2781
2592
|
|
2782
2593
|
_stream = False
|
2783
2594
|
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
|
2784
|
-
|
2595
|
+
_request, stream=_stream, **kwargs
|
2785
2596
|
)
|
2786
2597
|
|
2787
2598
|
response = pipeline_response.http_response
|
@@ -2802,6 +2613,4 @@ class ContainerOperations:
|
|
2802
2613
|
response_headers["x-ms-account-kind"] = self._deserialize("str", response.headers.get("x-ms-account-kind"))
|
2803
2614
|
|
2804
2615
|
if cls:
|
2805
|
-
return cls(pipeline_response, None, response_headers)
|
2806
|
-
|
2807
|
-
get_account_info.metadata = {"url": "{url}"}
|
2616
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|