azure-storage-blob 12.26.0b1__py3-none-any.whl → 12.27.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure/storage/blob/__init__.py +6 -5
- azure/storage/blob/_blob_client.py +59 -38
- azure/storage/blob/_blob_client.pyi +780 -0
- azure/storage/blob/_blob_client_helpers.py +4 -3
- azure/storage/blob/_blob_service_client.py +57 -17
- azure/storage/blob/_blob_service_client.pyi +182 -0
- azure/storage/blob/_container_client.py +47 -22
- azure/storage/blob/_container_client.pyi +380 -0
- azure/storage/blob/_deserialize.py +1 -1
- azure/storage/blob/_download.py +7 -7
- azure/storage/blob/_encryption.py +177 -184
- azure/storage/blob/_generated/_azure_blob_storage.py +3 -2
- azure/storage/blob/_generated/_configuration.py +2 -2
- azure/storage/blob/_generated/_utils/__init__.py +6 -0
- azure/storage/blob/_generated/{_serialization.py → _utils/serialization.py} +4 -22
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +3 -2
- azure/storage/blob/_generated/aio/_configuration.py +2 -2
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +6 -10
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +35 -39
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +9 -13
- azure/storage/blob/_generated/aio/operations/_container_operations.py +20 -24
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +13 -17
- azure/storage/blob/_generated/aio/operations/_service_operations.py +10 -14
- azure/storage/blob/_generated/models/_models_py3.py +30 -9
- azure/storage/blob/_generated/operations/_append_blob_operations.py +11 -15
- azure/storage/blob/_generated/operations/_blob_operations.py +60 -64
- azure/storage/blob/_generated/operations/_block_blob_operations.py +16 -20
- azure/storage/blob/_generated/operations/_container_operations.py +39 -43
- azure/storage/blob/_generated/operations/_page_blob_operations.py +23 -27
- azure/storage/blob/_generated/operations/_service_operations.py +19 -23
- azure/storage/blob/_lease.py +3 -2
- azure/storage/blob/_lease.pyi +81 -0
- azure/storage/blob/_list_blobs_helper.py +1 -1
- azure/storage/blob/_quick_query_helper.py +3 -3
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/__init__.py +7 -7
- azure/storage/blob/_shared/authentication.py +49 -32
- azure/storage/blob/_shared/avro/avro_io.py +44 -42
- azure/storage/blob/_shared/avro/avro_io_async.py +42 -41
- azure/storage/blob/_shared/avro/datafile.py +24 -21
- azure/storage/blob/_shared/avro/datafile_async.py +15 -15
- azure/storage/blob/_shared/avro/schema.py +196 -217
- azure/storage/blob/_shared/base_client.py +79 -70
- azure/storage/blob/_shared/base_client_async.py +53 -68
- azure/storage/blob/_shared/constants.py +1 -1
- azure/storage/blob/_shared/models.py +94 -92
- azure/storage/blob/_shared/parser.py +3 -3
- azure/storage/blob/_shared/policies.py +186 -147
- azure/storage/blob/_shared/policies_async.py +58 -69
- azure/storage/blob/_shared/request_handlers.py +50 -45
- azure/storage/blob/_shared/response_handlers.py +54 -45
- azure/storage/blob/_shared/shared_access_signature.py +65 -73
- azure/storage/blob/_shared/uploads.py +56 -49
- azure/storage/blob/_shared/uploads_async.py +70 -58
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +8 -10
- azure/storage/blob/aio/_blob_client_async.py +81 -48
- azure/storage/blob/aio/_blob_client_async.pyi +763 -0
- azure/storage/blob/aio/_blob_service_client_async.py +54 -15
- azure/storage/blob/aio/_blob_service_client_async.pyi +187 -0
- azure/storage/blob/aio/_container_client_async.py +55 -26
- azure/storage/blob/aio/_container_client_async.pyi +384 -0
- azure/storage/blob/aio/_download_async.py +15 -11
- azure/storage/blob/aio/_lease_async.py +3 -2
- azure/storage/blob/aio/_lease_async.pyi +81 -0
- azure/storage/blob/aio/_quick_query_helper_async.py +3 -3
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/METADATA +18 -6
- azure_storage_blob-12.27.0.dist-info/RECORD +94 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/WHEEL +1 -1
- azure_storage_blob-12.26.0b1.dist-info/RECORD +0 -85
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info/licenses}/LICENSE +0 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0.dist-info}/top_level.txt +0 -0
@@ -30,7 +30,6 @@ from ._upload_helpers import (
|
|
30
30
|
upload_block_blob,
|
31
31
|
upload_page_blob
|
32
32
|
)
|
33
|
-
from .._blob_client import StorageAccountHostsMixin
|
34
33
|
from .._blob_client_helpers import (
|
35
34
|
_abort_copy_options,
|
36
35
|
_append_block_from_url_options,
|
@@ -74,6 +73,7 @@ from .._generated.aio import AzureBlobStorage
|
|
74
73
|
from .._generated.models import CpkInfo
|
75
74
|
from .._models import BlobType, BlobBlock, BlobProperties, BlobQueryError, PageRange
|
76
75
|
from .._serialize import get_access_conditions, get_api_version, get_modify_conditions, get_version_id
|
76
|
+
from .._shared.base_client import StorageAccountHostsMixin
|
77
77
|
from .._shared.base_client_async import AsyncStorageAccountHostsMixin, AsyncTransportWrapper, parse_connection_str
|
78
78
|
from .._shared.policies_async import ExponentialRetry
|
79
79
|
from .._shared.response_handlers import process_storage_error, return_response_headers
|
@@ -98,7 +98,11 @@ if TYPE_CHECKING:
|
|
98
98
|
)
|
99
99
|
|
100
100
|
|
101
|
-
class BlobClient(
|
101
|
+
class BlobClient( # type: ignore [misc] # pylint: disable=too-many-public-methods
|
102
|
+
AsyncStorageAccountHostsMixin,
|
103
|
+
StorageAccountHostsMixin,
|
104
|
+
StorageEncryptionMixin
|
105
|
+
):
|
102
106
|
"""A client to interact with a specific blob, although that blob may not yet exist.
|
103
107
|
|
104
108
|
:param str account_url:
|
@@ -165,12 +169,12 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
165
169
|
:caption: Creating the BlobClient from a SAS URL to a blob.
|
166
170
|
"""
|
167
171
|
def __init__(
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
172
|
+
self, account_url: str,
|
173
|
+
container_name: str,
|
174
|
+
blob_name: str,
|
175
|
+
snapshot: Optional[Union[str, Dict[str, Any]]] = None,
|
176
|
+
credential: Optional[Union[str, Dict[str, str], "AzureNamedKeyCredential", "AzureSasCredential", "AsyncTokenCredential"]] = None, # pylint: disable=line-too-long
|
177
|
+
**kwargs: Any
|
174
178
|
) -> None:
|
175
179
|
kwargs['retry_policy'] = kwargs.get('retry_policy') or ExponentialRetry(**kwargs)
|
176
180
|
parsed_url, sas_token, path_snapshot = _parse_url(
|
@@ -196,6 +200,22 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
196
200
|
self._client._config.version = get_api_version(kwargs) # type: ignore [assignment]
|
197
201
|
self._configure_encryption(kwargs)
|
198
202
|
|
203
|
+
async def __aenter__(self) -> Self:
|
204
|
+
await self._client.__aenter__()
|
205
|
+
return self
|
206
|
+
|
207
|
+
async def __aexit__(self, *args) -> None:
|
208
|
+
await self._client.__aexit__(*args)
|
209
|
+
|
210
|
+
async def close(self) -> None:
|
211
|
+
"""This method is to close the sockets opened by the client.
|
212
|
+
It need not be used when using with a context manager.
|
213
|
+
|
214
|
+
:return: None
|
215
|
+
:rtype: None
|
216
|
+
"""
|
217
|
+
await self._client.close()
|
218
|
+
|
199
219
|
def _format_url(self, hostname: str) -> str:
|
200
220
|
return _format_url(
|
201
221
|
container_name=self.container_name,
|
@@ -228,7 +248,11 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
228
248
|
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
|
229
249
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
230
250
|
should be the storage account key.
|
231
|
-
:type credential:
|
251
|
+
:type credential:
|
252
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
253
|
+
~azure.core.credentials.AzureSasCredential or
|
254
|
+
~azure.core.credentials_async.AsyncTokenCredential or
|
255
|
+
str or dict[str, str] or None
|
232
256
|
:param str snapshot:
|
233
257
|
The optional blob snapshot on which to operate. This can be the snapshot ID string
|
234
258
|
or the response returned from :func:`create_snapshot`. If specified, this will override
|
@@ -238,7 +262,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
238
262
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
239
263
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
240
264
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
241
|
-
:
|
265
|
+
:return: A Blob client.
|
242
266
|
:rtype: ~azure.storage.blob.BlobClient
|
243
267
|
"""
|
244
268
|
account_url, container_name, blob_name, path_snapshot = _from_blob_url(blob_url=blob_url, snapshot=snapshot)
|
@@ -276,13 +300,17 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
276
300
|
Credentials provided here will take precedence over those in the connection string.
|
277
301
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
278
302
|
should be the storage account key.
|
279
|
-
:type credential:
|
303
|
+
:type credential:
|
304
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
305
|
+
~azure.core.credentials.AzureSasCredential or
|
306
|
+
~azure.core.credentials_async.AsyncTokenCredential or
|
307
|
+
str or dict[str, str] or None
|
280
308
|
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
|
281
309
|
specifies the version of the blob to operate on.
|
282
310
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
283
311
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
284
312
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
285
|
-
:
|
313
|
+
:return: A Blob client.
|
286
314
|
:rtype: ~azure.storage.blob.BlobClient
|
287
315
|
|
288
316
|
.. admonition:: Example:
|
@@ -309,7 +337,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
309
337
|
The information can also be retrieved if the user has a SAS to a container or blob.
|
310
338
|
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
311
339
|
|
312
|
-
:
|
340
|
+
:return: A dict of account information (SKU and account type).
|
313
341
|
:rtype: dict(str, str)
|
314
342
|
"""
|
315
343
|
try:
|
@@ -430,7 +458,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
430
458
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
431
459
|
|
432
460
|
:paramtype source_token_intent: Literal['backup']
|
433
|
-
:
|
461
|
+
:return: Response from creating a new block blob for a given URL.
|
434
462
|
:rtype: Dict[str, Any]
|
435
463
|
"""
|
436
464
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -581,7 +609,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
581
609
|
the timeout will apply to each call individually.
|
582
610
|
multiple calls to the Azure service and the timeout will apply to
|
583
611
|
each call individually.
|
584
|
-
:
|
612
|
+
:return: Blob-updated property dict (Etag and last modified)
|
585
613
|
:rtype: dict[str, Any]
|
586
614
|
|
587
615
|
.. admonition:: Example:
|
@@ -726,7 +754,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
726
754
|
the timeout will apply to each call individually.
|
727
755
|
multiple calls to the Azure service and the timeout will apply to
|
728
756
|
each call individually.
|
729
|
-
:
|
757
|
+
:return: A streaming object (StorageStreamDownloader)
|
730
758
|
:rtype: ~azure.storage.blob.aio.StorageStreamDownloader
|
731
759
|
|
732
760
|
.. admonition:: Example:
|
@@ -853,7 +881,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
853
881
|
This value is not tracked or validated on the client. To configure client-side network timeouts
|
854
882
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
855
883
|
#other-client--per-operation-configuration>`__.
|
856
|
-
:
|
884
|
+
:return: A streaming object (BlobQueryReader)
|
857
885
|
:rtype: ~azure.storage.blob.aio.BlobQueryReader
|
858
886
|
"""
|
859
887
|
error_cls = kwargs.pop("error_cls", BlobQueryError)
|
@@ -905,7 +933,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
905
933
|
and retains the blob for a specified number of days.
|
906
934
|
After the specified number of days, the blob's data is removed from the service during garbage collection.
|
907
935
|
Soft deleted blob is accessible through :func:`~ContainerClient.list_blobs()` specifying `include=['deleted']`
|
908
|
-
option. Soft-deleted blob can be restored using :func
|
936
|
+
option. Soft-deleted blob can be restored using :func:`~BlobClient.undelete_blob()` operation.
|
909
937
|
|
910
938
|
:param str delete_snapshots:
|
911
939
|
Required if the blob has associated snapshots. Values include:
|
@@ -953,6 +981,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
953
981
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
954
982
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
955
983
|
#other-client--per-operation-configuration>`__.
|
984
|
+
:return: None
|
956
985
|
:rtype: None
|
957
986
|
|
958
987
|
.. admonition:: Example:
|
@@ -991,6 +1020,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
991
1020
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
992
1021
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
993
1022
|
#other-client--per-operation-configuration>`__.
|
1023
|
+
:return: None
|
994
1024
|
:rtype: None
|
995
1025
|
|
996
1026
|
.. admonition:: Example:
|
@@ -1022,7 +1052,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1022
1052
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1023
1053
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1024
1054
|
#other-client--per-operation-configuration>`__.
|
1025
|
-
:
|
1055
|
+
:return: boolean
|
1026
1056
|
:rtype: bool
|
1027
1057
|
"""
|
1028
1058
|
version_id = get_version_id(self.version_id, kwargs)
|
@@ -1092,7 +1122,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1092
1122
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1093
1123
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1094
1124
|
#other-client--per-operation-configuration>`__.
|
1095
|
-
:
|
1125
|
+
:return: BlobProperties
|
1096
1126
|
:rtype: ~azure.storage.blob.BlobProperties
|
1097
1127
|
|
1098
1128
|
.. admonition:: Example:
|
@@ -1180,7 +1210,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1180
1210
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1181
1211
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1182
1212
|
#other-client--per-operation-configuration>`__.
|
1183
|
-
:
|
1213
|
+
:return: Blob-updated property dict (Etag and last modified)
|
1184
1214
|
:rtype: Dict[str, Any]
|
1185
1215
|
"""
|
1186
1216
|
options = _set_http_headers_options(content_settings=content_settings, **kwargs)
|
@@ -1247,7 +1277,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1247
1277
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1248
1278
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1249
1279
|
#other-client--per-operation-configuration>`__.
|
1250
|
-
:
|
1280
|
+
:return: Blob-updated property dict (Etag and last modified)
|
1251
1281
|
:rtype: Dict[str, Union[str, datetime]]
|
1252
1282
|
"""
|
1253
1283
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -1283,7 +1313,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1283
1313
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1284
1314
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1285
1315
|
#other-client--per-operation-configuration>`__.
|
1286
|
-
:
|
1316
|
+
:return: Key value pairs of blob tags.
|
1287
1317
|
:rtype: Dict[str, str]
|
1288
1318
|
"""
|
1289
1319
|
|
@@ -1309,7 +1339,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1309
1339
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1310
1340
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1311
1341
|
#other-client--per-operation-configuration>`__.
|
1312
|
-
:
|
1342
|
+
:return: Key value pairs of blob tags.
|
1313
1343
|
:rtype: Dict[str, str]
|
1314
1344
|
"""
|
1315
1345
|
|
@@ -1334,7 +1364,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1334
1364
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1335
1365
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1336
1366
|
#other-client--per-operation-configuration>`__.
|
1337
|
-
:
|
1367
|
+
:return: Key value pairs of blob tags.
|
1338
1368
|
:rtype: Dict[str, Union[str, datetime, bool]]
|
1339
1369
|
"""
|
1340
1370
|
|
@@ -1431,7 +1461,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1431
1461
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1432
1462
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1433
1463
|
#other-client--per-operation-configuration>`__.
|
1434
|
-
:
|
1464
|
+
:return: Blob-updated property dict (Etag and last modified).
|
1435
1465
|
:rtype: dict[str, Any]
|
1436
1466
|
"""
|
1437
1467
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -1527,7 +1557,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1527
1557
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1528
1558
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1529
1559
|
#other-client--per-operation-configuration>`__.
|
1530
|
-
:
|
1560
|
+
:return: Blob-updated property dict (Etag and last modified).
|
1531
1561
|
:rtype: dict[str, Any]
|
1532
1562
|
"""
|
1533
1563
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -1607,7 +1637,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1607
1637
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1608
1638
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1609
1639
|
#other-client--per-operation-configuration>`__.
|
1610
|
-
:
|
1640
|
+
:return: Blob-updated property dict (Snapshot ID, Etag, and last modified).
|
1611
1641
|
:rtype: dict[str, Any]
|
1612
1642
|
|
1613
1643
|
.. admonition:: Example:
|
@@ -1813,7 +1843,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1813
1843
|
|
1814
1844
|
.. versionadded:: 12.10.0
|
1815
1845
|
|
1816
|
-
:
|
1846
|
+
:return: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
|
1817
1847
|
:rtype: dict[str, Union[str, ~datetime.datetime]]
|
1818
1848
|
|
1819
1849
|
.. admonition:: Example:
|
@@ -1852,6 +1882,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1852
1882
|
The copy operation to abort. This can be either an ID, or an
|
1853
1883
|
instance of BlobProperties.
|
1854
1884
|
:type copy_id: str or ~azure.storage.blob.BlobProperties
|
1885
|
+
:return: None
|
1855
1886
|
:rtype: None
|
1856
1887
|
|
1857
1888
|
.. admonition:: Example:
|
@@ -1918,7 +1949,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1918
1949
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1919
1950
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1920
1951
|
#other-client--per-operation-configuration>`__.
|
1921
|
-
:
|
1952
|
+
:return: A BlobLeaseClient object.
|
1922
1953
|
:rtype: ~azure.storage.blob.aio.BlobLeaseClient
|
1923
1954
|
|
1924
1955
|
.. admonition:: Example:
|
@@ -1967,6 +1998,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
1967
1998
|
Required if the blob has an active lease. Value can be a BlobLeaseClient object
|
1968
1999
|
or the lease ID as a string.
|
1969
2000
|
:paramtype lease: ~azure.storage.blob.aio.BlobLeaseClient or str
|
2001
|
+
:return: None
|
1970
2002
|
:rtype: None
|
1971
2003
|
"""
|
1972
2004
|
access_conditions = get_access_conditions(kwargs.pop('lease', None))
|
@@ -2034,7 +2066,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2034
2066
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2035
2067
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2036
2068
|
#other-client--per-operation-configuration>`__.
|
2037
|
-
:
|
2069
|
+
:return: Blob property dict.
|
2038
2070
|
:rtype: Dict[str, Any]
|
2039
2071
|
"""
|
2040
2072
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -2109,7 +2141,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2109
2141
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
2110
2142
|
|
2111
2143
|
:paramtype source_token_intent: Literal['backup']
|
2112
|
-
:
|
2144
|
+
:return: Blob property dict.
|
2113
2145
|
:rtype: Dict[str, Any]
|
2114
2146
|
"""
|
2115
2147
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -2155,7 +2187,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2155
2187
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2156
2188
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2157
2189
|
#other-client--per-operation-configuration>`__.
|
2158
|
-
:
|
2190
|
+
:return: A tuple of two lists - committed and uncommitted blocks
|
2159
2191
|
:rtype: Tuple[List[BlobBlock], List[BlobBlock]]
|
2160
2192
|
"""
|
2161
2193
|
access_conditions = get_access_conditions(kwargs.pop('lease', None))
|
@@ -2268,7 +2300,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2268
2300
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2269
2301
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2270
2302
|
#other-client--per-operation-configuration>`__.
|
2271
|
-
:
|
2303
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2272
2304
|
:rtype: dict(str, Any)
|
2273
2305
|
"""
|
2274
2306
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -2310,6 +2342,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2310
2342
|
Required if the blob has an active lease. Value can be a BlobLeaseClient object
|
2311
2343
|
or the lease ID as a string.
|
2312
2344
|
:paramtype lease: ~azure.storage.blob.aio.BlobLeaseClient or str
|
2345
|
+
:return: None
|
2313
2346
|
:rtype: None
|
2314
2347
|
"""
|
2315
2348
|
access_conditions = get_access_conditions(kwargs.pop('lease', None))
|
@@ -2365,7 +2398,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2365
2398
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2366
2399
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2367
2400
|
#other-client--per-operation-configuration>`__.
|
2368
|
-
:
|
2401
|
+
:return: Blob-updated property dict (Etag and last modified)
|
2369
2402
|
:rtype: Dict[str, Any]
|
2370
2403
|
"""
|
2371
2404
|
version_id = get_version_id(self.version_id, kwargs)
|
@@ -2398,7 +2431,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2398
2431
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2399
2432
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2400
2433
|
#other-client--per-operation-configuration>`__.
|
2401
|
-
:
|
2434
|
+
:return: Key value pairs of blob tags.
|
2402
2435
|
:rtype: Dict[str, str]
|
2403
2436
|
"""
|
2404
2437
|
version_id = get_version_id(self.version_id, kwargs)
|
@@ -2470,7 +2503,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2470
2503
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2471
2504
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2472
2505
|
#other-client--per-operation-configuration>`__.
|
2473
|
-
:
|
2506
|
+
:return:
|
2474
2507
|
A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
|
2475
2508
|
The first element are filled page ranges, the 2nd element is cleared page ranges.
|
2476
2509
|
:rtype: tuple(list(dict(str, str), list(dict(str, str))
|
@@ -2563,7 +2596,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2563
2596
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2564
2597
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2565
2598
|
#other-client--per-operation-configuration>`__.
|
2566
|
-
:
|
2599
|
+
:return: An iterable (auto-paging) of PageRange.
|
2567
2600
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.PageRange]
|
2568
2601
|
"""
|
2569
2602
|
results_per_page = kwargs.pop('results_per_page', None)
|
@@ -2646,7 +2679,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2646
2679
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2647
2680
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2648
2681
|
#other-client--per-operation-configuration>`__.
|
2649
|
-
:
|
2682
|
+
:return:
|
2650
2683
|
A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
|
2651
2684
|
The first element are filled page ranges, the 2nd element is cleared page ranges.
|
2652
2685
|
:rtype: tuple(list(dict(str, str), list(dict(str, str))
|
@@ -2711,7 +2744,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2711
2744
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2712
2745
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2713
2746
|
#other-client--per-operation-configuration>`__.
|
2714
|
-
:
|
2747
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2715
2748
|
:rtype: dict(str, Any)
|
2716
2749
|
"""
|
2717
2750
|
options = _set_sequence_number_options(sequence_number_action, sequence_number=sequence_number, **kwargs)
|
@@ -2767,7 +2800,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2767
2800
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2768
2801
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2769
2802
|
#other-client--per-operation-configuration>`__.
|
2770
|
-
:
|
2803
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2771
2804
|
:rtype: dict(str, Any)
|
2772
2805
|
"""
|
2773
2806
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -2863,7 +2896,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2863
2896
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2864
2897
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2865
2898
|
#other-client--per-operation-configuration>`__.
|
2866
|
-
:
|
2899
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2867
2900
|
:rtype: dict(str, Any)
|
2868
2901
|
"""
|
2869
2902
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -2994,7 +3027,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
2994
3027
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
2995
3028
|
|
2996
3029
|
:paramtype source_token_intent: Literal['backup']
|
2997
|
-
:
|
3030
|
+
:return: Response after uploading pages from specified URL.
|
2998
3031
|
:rtype: Dict[str, Any]
|
2999
3032
|
"""
|
3000
3033
|
|
@@ -3075,7 +3108,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
3075
3108
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
3076
3109
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
3077
3110
|
#other-client--per-operation-configuration>`__.
|
3078
|
-
:
|
3111
|
+
:return: Blob-updated property dict (Etag and last modified).
|
3079
3112
|
:rtype: dict(str, Any)
|
3080
3113
|
"""
|
3081
3114
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3172,7 +3205,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
3172
3205
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
3173
3206
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
3174
3207
|
#other-client--per-operation-configuration>`__.
|
3175
|
-
:
|
3208
|
+
:return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
|
3176
3209
|
:rtype: dict(str, Any)
|
3177
3210
|
"""
|
3178
3211
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3296,7 +3329,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
3296
3329
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
3297
3330
|
|
3298
3331
|
:paramtype source_token_intent: Literal['backup']
|
3299
|
-
:
|
3332
|
+
:return: Result after appending a new block.
|
3300
3333
|
:rtype: Dict[str, Union[str, datetime, int]]
|
3301
3334
|
"""
|
3302
3335
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3354,7 +3387,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
3354
3387
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
3355
3388
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
3356
3389
|
#other-client--per-operation-configuration>`__.
|
3357
|
-
:
|
3390
|
+
:return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
|
3358
3391
|
:rtype: dict(str, Any)
|
3359
3392
|
"""
|
3360
3393
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3370,7 +3403,7 @@ class BlobClient(AsyncStorageAccountHostsMixin, StorageAccountHostsMixin, Storag
|
|
3370
3403
|
|
3371
3404
|
The container need not already exist. Defaults to current blob's credentials.
|
3372
3405
|
|
3373
|
-
:
|
3406
|
+
:return: A ContainerClient.
|
3374
3407
|
:rtype: ~azure.storage.blob.ContainerClient
|
3375
3408
|
|
3376
3409
|
.. admonition:: Example:
|