azure-storage-blob 12.26.0b1__py3-none-any.whl → 12.27.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 +3 -2
- azure/storage/blob/_blob_client.py +43 -38
- azure/storage/blob/_blob_client_helpers.py +4 -3
- azure/storage/blob/_blob_service_client.py +16 -13
- azure/storage/blob/_container_client.py +25 -22
- 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 +1 -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 +81 -59
- azure/storage/blob/_shared/base_client_async.py +58 -51
- 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 +53 -65
- 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 +3 -2
- azure/storage/blob/aio/_blob_client_async.py +53 -40
- azure/storage/blob/aio/_blob_service_client_async.py +13 -11
- azure/storage/blob/aio/_container_client_async.py +28 -25
- azure/storage/blob/aio/_download_async.py +7 -7
- azure/storage/blob/aio/_lease_async.py +1 -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.0b1.dist-info}/METADATA +3 -4
- azure_storage_blob-12.27.0b1.dist-info/RECORD +86 -0
- azure_storage_blob-12.26.0b1.dist-info/RECORD +0 -85
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/WHEEL +0 -0
- {azure_storage_blob-12.26.0b1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/top_level.txt +0 -0
azure/storage/blob/__init__.py
CHANGED
@@ -122,7 +122,7 @@ def upload_blob_to_url(
|
|
122
122
|
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
|
123
123
|
:keyword str encoding:
|
124
124
|
Encoding to use if text is supplied as input. Defaults to UTF-8.
|
125
|
-
:
|
125
|
+
:return: Blob-updated property dict (Etag and last modified)
|
126
126
|
:rtype: dict(str, Any)
|
127
127
|
"""
|
128
128
|
with BlobClient.from_blob_url(blob_url, credential=credential) as client:
|
@@ -153,7 +153,7 @@ def download_blob_from_url(
|
|
153
153
|
:param output:
|
154
154
|
Where the data should be downloaded to. This could be either a file path to write to,
|
155
155
|
or an open IO handle to write to.
|
156
|
-
:type output: str or
|
156
|
+
:type output: str or IO.
|
157
157
|
:param credential:
|
158
158
|
The credentials with which to authenticate. This is optional if the
|
159
159
|
blob URL already has a SAS token or the blob is public. The value can be a SAS token string,
|
@@ -190,6 +190,7 @@ def download_blob_from_url(
|
|
190
190
|
blob. Also note that if enabled, the memory-efficient upload algorithm
|
191
191
|
will not be used, because computing the MD5 hash requires buffering
|
192
192
|
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.
|
193
|
+
:return: None
|
193
194
|
:rtype: None
|
194
195
|
"""
|
195
196
|
overwrite = kwargs.pop('overwrite', False)
|
@@ -236,7 +236,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
236
236
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
237
237
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
238
238
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
239
|
-
:
|
239
|
+
:return: A Blob client.
|
240
240
|
:rtype: ~azure.storage.blob.BlobClient
|
241
241
|
"""
|
242
242
|
account_url, container_name, blob_name, path_snapshot = _from_blob_url(blob_url=blob_url, snapshot=snapshot)
|
@@ -284,7 +284,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
284
284
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
285
285
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
286
286
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
287
|
-
:
|
287
|
+
:return: A Blob client.
|
288
288
|
:rtype: ~azure.storage.blob.BlobClient
|
289
289
|
|
290
290
|
.. admonition:: Example:
|
@@ -311,7 +311,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
311
311
|
The information can also be retrieved if the user has a SAS to a container or blob.
|
312
312
|
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
313
313
|
|
314
|
-
:
|
314
|
+
:return: A dict of account information (SKU and account type).
|
315
315
|
:rtype: dict(str, str)
|
316
316
|
"""
|
317
317
|
try:
|
@@ -431,7 +431,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
431
431
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
432
432
|
|
433
433
|
:paramtype source_token_intent: Literal['backup']
|
434
|
-
:
|
434
|
+
:return: Blob-updated property Dict (Etag and last modified)
|
435
435
|
:rtype: Dict[str, Any]
|
436
436
|
"""
|
437
437
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -580,7 +580,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
580
580
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
581
581
|
#other-client--per-operation-configuration>`__. This method may make multiple calls to the service and
|
582
582
|
the timeout will apply to each call individually.
|
583
|
-
:
|
583
|
+
:return: Blob-updated property Dict (Etag and last modified)
|
584
584
|
:rtype: Dict[str, Any]
|
585
585
|
|
586
586
|
.. admonition:: Example:
|
@@ -725,7 +725,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
725
725
|
the timeout will apply to each call individually.
|
726
726
|
multiple calls to the Azure service and the timeout will apply to
|
727
727
|
each call individually.
|
728
|
-
:
|
728
|
+
:return: A streaming object (StorageStreamDownloader)
|
729
729
|
:rtype: ~azure.storage.blob.StorageStreamDownloader
|
730
730
|
|
731
731
|
.. admonition:: Example:
|
@@ -829,7 +829,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
829
829
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
830
830
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
831
831
|
#other-client--per-operation-configuration>`__.
|
832
|
-
:
|
832
|
+
:return: A streaming object (BlobQueryReader)
|
833
833
|
:rtype: ~azure.storage.blob.BlobQueryReader
|
834
834
|
|
835
835
|
.. admonition:: Example:
|
@@ -874,7 +874,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
874
874
|
and retains the blob for a specified number of days.
|
875
875
|
After the specified number of days, the blob's data is removed from the service during garbage collection.
|
876
876
|
Soft deleted blob is accessible through :func:`~ContainerClient.list_blobs()` specifying `include=['deleted']`
|
877
|
-
option. Soft-deleted blob can be restored using :func
|
877
|
+
option. Soft-deleted blob can be restored using :func:`~BlobClient.undelete_blob()` operation.
|
878
878
|
|
879
879
|
:param Optional[str] delete_snapshots:
|
880
880
|
Required if the blob has associated snapshots. Values include:
|
@@ -922,6 +922,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
922
922
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
923
923
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
924
924
|
#other-client--per-operation-configuration>`__.
|
925
|
+
:return: None
|
925
926
|
:rtype: None
|
926
927
|
|
927
928
|
.. admonition:: Example:
|
@@ -960,6 +961,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
960
961
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
961
962
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
962
963
|
#other-client--per-operation-configuration>`__.
|
964
|
+
:return: None
|
963
965
|
:rtype: None
|
964
966
|
|
965
967
|
.. admonition:: Example:
|
@@ -991,7 +993,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
991
993
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
992
994
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
993
995
|
#other-client--per-operation-configuration>`__.
|
994
|
-
:
|
996
|
+
:return: boolean
|
995
997
|
:rtype: bool
|
996
998
|
"""
|
997
999
|
version_id = get_version_id(self.version_id, kwargs)
|
@@ -1061,7 +1063,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1061
1063
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1062
1064
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1063
1065
|
#other-client--per-operation-configuration>`__.
|
1064
|
-
:
|
1066
|
+
:return: BlobProperties
|
1065
1067
|
:rtype: ~azure.storage.blob.BlobProperties
|
1066
1068
|
|
1067
1069
|
.. admonition:: Example:
|
@@ -1147,7 +1149,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1147
1149
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1148
1150
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1149
1151
|
#other-client--per-operation-configuration>`__.
|
1150
|
-
:
|
1152
|
+
:return: Blob-updated property dict (Etag and last modified)
|
1151
1153
|
:rtype: Dict[str, Any]
|
1152
1154
|
"""
|
1153
1155
|
options = _set_http_headers_options(content_settings=content_settings, **kwargs)
|
@@ -1214,7 +1216,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1214
1216
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1215
1217
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1216
1218
|
#other-client--per-operation-configuration>`__.
|
1217
|
-
:
|
1219
|
+
:return: Blob-updated property dict (Etag and last modified)
|
1218
1220
|
:rtype: Dict[str, Union[str, datetime]]
|
1219
1221
|
"""
|
1220
1222
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -1250,7 +1252,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1250
1252
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1251
1253
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1252
1254
|
#other-client--per-operation-configuration>`__.
|
1253
|
-
:
|
1255
|
+
:return: Key value pairs of blob tags.
|
1254
1256
|
:rtype: Dict[str, str]
|
1255
1257
|
"""
|
1256
1258
|
|
@@ -1276,7 +1278,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1276
1278
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1277
1279
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1278
1280
|
#other-client--per-operation-configuration>`__.
|
1279
|
-
:
|
1281
|
+
:return: Key value pairs of blob tags.
|
1280
1282
|
:rtype: Dict[str, str]
|
1281
1283
|
"""
|
1282
1284
|
|
@@ -1301,7 +1303,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1301
1303
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1302
1304
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1303
1305
|
#other-client--per-operation-configuration>`__.
|
1304
|
-
:
|
1306
|
+
:return: Key value pairs of blob tags.
|
1305
1307
|
:rtype: Dict[str, Union[str, datetime, bool]]
|
1306
1308
|
"""
|
1307
1309
|
|
@@ -1398,7 +1400,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1398
1400
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1399
1401
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1400
1402
|
#other-client--per-operation-configuration>`__.
|
1401
|
-
:
|
1403
|
+
:return: Blob-updated property dict (Etag and last modified).
|
1402
1404
|
:rtype: dict[str, Any]
|
1403
1405
|
"""
|
1404
1406
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -1494,7 +1496,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1494
1496
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1495
1497
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1496
1498
|
#other-client--per-operation-configuration>`__.
|
1497
|
-
:
|
1499
|
+
:return: Blob-updated property dict (Etag and last modified).
|
1498
1500
|
:rtype: dict[str, Any]
|
1499
1501
|
"""
|
1500
1502
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -1573,7 +1575,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1573
1575
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1574
1576
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1575
1577
|
#other-client--per-operation-configuration>`__.
|
1576
|
-
:
|
1578
|
+
:return: Blob-updated property dict (Snapshot ID, Etag, and last modified).
|
1577
1579
|
:rtype: dict[str, Any]
|
1578
1580
|
|
1579
1581
|
.. admonition:: Example:
|
@@ -1773,7 +1775,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1773
1775
|
|
1774
1776
|
.. versionadded:: 12.10.0
|
1775
1777
|
|
1776
|
-
:
|
1778
|
+
:return: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
|
1777
1779
|
:rtype: dict[str, Union[str, ~datetime.datetime]]
|
1778
1780
|
|
1779
1781
|
.. admonition:: Example:
|
@@ -1812,6 +1814,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1812
1814
|
The copy operation to abort. This can be either an ID string, or an
|
1813
1815
|
instance of BlobProperties.
|
1814
1816
|
:type copy_id: str or ~azure.storage.blob.BlobProperties
|
1817
|
+
:return: None
|
1815
1818
|
:rtype: None
|
1816
1819
|
|
1817
1820
|
.. admonition:: Example:
|
@@ -1874,7 +1877,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1874
1877
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
1875
1878
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1876
1879
|
#other-client--per-operation-configuration>`__.
|
1877
|
-
:
|
1880
|
+
:return: A BlobLeaseClient object.
|
1878
1881
|
:rtype: ~azure.storage.blob.BlobLeaseClient
|
1879
1882
|
|
1880
1883
|
.. admonition:: Example:
|
@@ -1930,6 +1933,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1930
1933
|
Required if the blob has an active lease. Value can be a BlobLeaseClient object
|
1931
1934
|
or the lease ID as a string.
|
1932
1935
|
:paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
|
1936
|
+
:return: None
|
1933
1937
|
:rtype: None
|
1934
1938
|
"""
|
1935
1939
|
access_conditions = get_access_conditions(kwargs.pop('lease', None))
|
@@ -2000,7 +2004,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2000
2004
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2001
2005
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2002
2006
|
#other-client--per-operation-configuration>`__.
|
2003
|
-
:
|
2007
|
+
:return: Blob property dict.
|
2004
2008
|
:rtype: dict[str, Any]
|
2005
2009
|
"""
|
2006
2010
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -2075,7 +2079,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2075
2079
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
2076
2080
|
|
2077
2081
|
:paramtype source_token_intent: Literal['backup']
|
2078
|
-
:
|
2082
|
+
:return: Blob property dict.
|
2079
2083
|
:rtype: dict[str, Any]
|
2080
2084
|
"""
|
2081
2085
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -2120,7 +2124,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2120
2124
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2121
2125
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2122
2126
|
#other-client--per-operation-configuration>`__.
|
2123
|
-
:
|
2127
|
+
:return: A tuple of two lists - committed and uncommitted blocks
|
2124
2128
|
:rtype: Tuple[List[BlobBlock], List[BlobBlock]]
|
2125
2129
|
"""
|
2126
2130
|
access_conditions = get_access_conditions(kwargs.pop('lease', None))
|
@@ -2232,7 +2236,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2232
2236
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2233
2237
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2234
2238
|
#other-client--per-operation-configuration>`__.
|
2235
|
-
:
|
2239
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2236
2240
|
:rtype: dict(str, Any)
|
2237
2241
|
"""
|
2238
2242
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -2274,6 +2278,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2274
2278
|
Required if the blob has an active lease. Value can be a BlobLeaseClient object
|
2275
2279
|
or the lease ID as a string.
|
2276
2280
|
:paramtype lease: ~azure.storage.blob.BlobLeaseClient or str
|
2281
|
+
:return: None
|
2277
2282
|
:rtype: None
|
2278
2283
|
"""
|
2279
2284
|
access_conditions = get_access_conditions(kwargs.pop('lease', None))
|
@@ -2329,7 +2334,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2329
2334
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2330
2335
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2331
2336
|
#other-client--per-operation-configuration>`__.
|
2332
|
-
:
|
2337
|
+
:return: Blob-updated property dict (Etag and last modified)
|
2333
2338
|
:rtype: Dict[str, Any]
|
2334
2339
|
"""
|
2335
2340
|
version_id = get_version_id(self.version_id, kwargs)
|
@@ -2362,7 +2367,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2362
2367
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2363
2368
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2364
2369
|
#other-client--per-operation-configuration>`__.
|
2365
|
-
:
|
2370
|
+
:return: Key value pairs of blob tags.
|
2366
2371
|
:rtype: Dict[str, str]
|
2367
2372
|
"""
|
2368
2373
|
version_id = get_version_id(self.version_id, kwargs)
|
@@ -2434,7 +2439,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2434
2439
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2435
2440
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2436
2441
|
#other-client--per-operation-configuration>`__.
|
2437
|
-
:
|
2442
|
+
:return:
|
2438
2443
|
A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
|
2439
2444
|
The first element are filled page ranges, the 2nd element is cleared page ranges.
|
2440
2445
|
:rtype: tuple(list(dict(str, str), list(dict(str, str))
|
@@ -2527,7 +2532,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2527
2532
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2528
2533
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2529
2534
|
#other-client--per-operation-configuration>`__.
|
2530
|
-
:
|
2535
|
+
:return: An iterable (auto-paging) of PageRange.
|
2531
2536
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.PageRange]
|
2532
2537
|
"""
|
2533
2538
|
results_per_page = kwargs.pop('results_per_page', None)
|
@@ -2610,7 +2615,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2610
2615
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2611
2616
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2612
2617
|
#other-client--per-operation-configuration>`__.
|
2613
|
-
:
|
2618
|
+
:return:
|
2614
2619
|
A tuple of two lists of page ranges as dictionaries with 'start' and 'end' keys.
|
2615
2620
|
The first element are filled page ranges, the 2nd element is cleared page ranges.
|
2616
2621
|
:rtype: tuple(list(dict(str, str), list(dict(str, str))
|
@@ -2675,7 +2680,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2675
2680
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2676
2681
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2677
2682
|
#other-client--per-operation-configuration>`__.
|
2678
|
-
:
|
2683
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2679
2684
|
:rtype: dict(str, Any)
|
2680
2685
|
"""
|
2681
2686
|
options = _set_sequence_number_options(sequence_number_action, sequence_number=sequence_number, **kwargs)
|
@@ -2731,7 +2736,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2731
2736
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2732
2737
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2733
2738
|
#other-client--per-operation-configuration>`__.
|
2734
|
-
:
|
2739
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2735
2740
|
:rtype: dict(str, Any)
|
2736
2741
|
"""
|
2737
2742
|
if kwargs.get('cpk') and self.scheme.lower() != 'https':
|
@@ -2827,7 +2832,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2827
2832
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
2828
2833
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
2829
2834
|
#other-client--per-operation-configuration>`__.
|
2830
|
-
:
|
2835
|
+
:return: Blob-updated property dict (Etag and last modified).
|
2831
2836
|
:rtype: dict(str, Any)
|
2832
2837
|
"""
|
2833
2838
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -2958,7 +2963,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2958
2963
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
2959
2964
|
|
2960
2965
|
:paramtype source_token_intent: Literal['backup']
|
2961
|
-
:
|
2966
|
+
:return: Response after uploading pages from specified URL.
|
2962
2967
|
:rtype: Dict[str, Any]
|
2963
2968
|
"""
|
2964
2969
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3038,7 +3043,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3038
3043
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
3039
3044
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
3040
3045
|
#other-client--per-operation-configuration>`__.
|
3041
|
-
:
|
3046
|
+
:return: Blob-updated property dict (Etag and last modified).
|
3042
3047
|
:rtype: dict(str, Any)
|
3043
3048
|
"""
|
3044
3049
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3135,7 +3140,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3135
3140
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
3136
3141
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
3137
3142
|
#other-client--per-operation-configuration>`__.
|
3138
|
-
:
|
3143
|
+
:return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
|
3139
3144
|
:rtype: dict(str, Any)
|
3140
3145
|
"""
|
3141
3146
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3259,7 +3264,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3259
3264
|
ACLs are bypassed and full permissions are granted. User must also have required RBAC permission.
|
3260
3265
|
|
3261
3266
|
:paramtype source_token_intent: Literal['backup']
|
3262
|
-
:
|
3267
|
+
:return: Result after appending a new block.
|
3263
3268
|
:rtype: Dict[str, Union[str, datetime, int]]
|
3264
3269
|
"""
|
3265
3270
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3317,7 +3322,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3317
3322
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
3318
3323
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
3319
3324
|
#other-client--per-operation-configuration>`__.
|
3320
|
-
:
|
3325
|
+
:return: Blob-updated property dict (Etag, last modified, append offset, committed block count).
|
3321
3326
|
:rtype: dict(str, Any)
|
3322
3327
|
"""
|
3323
3328
|
if self.require_encryption or (self.key_encryption_key is not None):
|
@@ -3334,7 +3339,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3334
3339
|
|
3335
3340
|
The container need not already exist. Defaults to current blob's credentials.
|
3336
3341
|
|
3337
|
-
:
|
3342
|
+
:return: A ContainerClient.
|
3338
3343
|
:rtype: ~azure.storage.blob.ContainerClient
|
3339
3344
|
|
3340
3345
|
.. admonition:: Example:
|
@@ -270,7 +270,7 @@ def _download_blob_options(
|
|
270
270
|
The string representing the SDK package version.
|
271
271
|
:param AzureBlobStorage client:
|
272
272
|
The generated Blob Storage client.
|
273
|
-
:
|
273
|
+
:return: A dictionary containing the download blob options.
|
274
274
|
:rtype: Dict[str, Any]
|
275
275
|
"""
|
276
276
|
if length is not None:
|
@@ -658,19 +658,20 @@ def _start_copy_from_url_options( # pylint:disable=too-many-statements
|
|
658
658
|
|
659
659
|
options = {
|
660
660
|
'copy_source': source_url,
|
661
|
-
'seal_blob': kwargs.pop('seal_destination_blob', None),
|
662
661
|
'timeout': timeout,
|
663
662
|
'modified_access_conditions': dest_mod_conditions,
|
664
|
-
'blob_tags_string': blob_tags_string,
|
665
663
|
'headers': headers,
|
666
664
|
'cls': return_response_headers,
|
667
665
|
}
|
666
|
+
|
668
667
|
if not incremental_copy:
|
669
668
|
source_mod_conditions = get_source_conditions(kwargs)
|
670
669
|
dest_access_conditions = get_access_conditions(kwargs.pop('destination_lease', None))
|
671
670
|
options['source_modified_access_conditions'] = source_mod_conditions
|
672
671
|
options['lease_access_conditions'] = dest_access_conditions
|
673
672
|
options['tier'] = tier.value if tier else None
|
673
|
+
options['seal_blob'] = kwargs.pop('seal_destination_blob', None)
|
674
|
+
options['blob_tags_string'] = blob_tags_string
|
674
675
|
options.update(kwargs)
|
675
676
|
return options
|
676
677
|
|
@@ -137,7 +137,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
137
137
|
|
138
138
|
:param str hostname:
|
139
139
|
The hostname of the current location mode.
|
140
|
-
:
|
140
|
+
:return: A formatted endpoint URL including current location mode hostname.
|
141
141
|
:rtype: str
|
142
142
|
"""
|
143
143
|
return f"{self.scheme}://{hostname}/{self._query_str}"
|
@@ -169,7 +169,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
169
169
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
170
170
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
171
171
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
172
|
-
:
|
172
|
+
:return: A Blob service client.
|
173
173
|
:rtype: ~azure.storage.blob.BlobServiceClient
|
174
174
|
|
175
175
|
.. admonition:: Example:
|
@@ -206,7 +206,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
206
206
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
207
207
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
208
208
|
#other-client--per-operation-configuration>`__.
|
209
|
-
:
|
209
|
+
:return: The user delegation key.
|
210
210
|
:rtype: ~azure.storage.blob.UserDelegationKey
|
211
211
|
"""
|
212
212
|
key_info = KeyInfo(start=_to_utc_datetime(key_start_time), expiry=_to_utc_datetime(key_expiry_time))
|
@@ -227,7 +227,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
227
227
|
The information can also be retrieved if the user has a SAS to a container or blob.
|
228
228
|
The keys in the returned dictionary include 'sku_name' and 'account_kind'.
|
229
229
|
|
230
|
-
:
|
230
|
+
:return: A dict of account information (SKU and account type).
|
231
231
|
:rtype: dict(str, str)
|
232
232
|
|
233
233
|
.. admonition:: Example:
|
@@ -270,7 +270,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
270
270
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
271
271
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
272
272
|
#other-client--per-operation-configuration>`__.
|
273
|
-
:
|
273
|
+
:return: The blob service stats.
|
274
274
|
:rtype: Dict[str, Any]
|
275
275
|
|
276
276
|
.. admonition:: Example:
|
@@ -301,7 +301,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
301
301
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
302
302
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
303
303
|
#other-client--per-operation-configuration>`__.
|
304
|
-
:
|
304
|
+
:return: An object containing blob service properties such as
|
305
305
|
analytics logging, hour/minute metrics, cors rules, etc.
|
306
306
|
:rtype: Dict[str, Any]
|
307
307
|
|
@@ -371,6 +371,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
371
371
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
372
372
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
373
373
|
#other-client--per-operation-configuration>`__.
|
374
|
+
:return: None
|
374
375
|
:rtype: None
|
375
376
|
|
376
377
|
.. admonition:: Example:
|
@@ -435,7 +436,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
435
436
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
436
437
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
437
438
|
#other-client--per-operation-configuration>`__.
|
438
|
-
:
|
439
|
+
:return: An iterable (auto-paging) of ContainerProperties.
|
439
440
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.ContainerProperties]
|
440
441
|
|
441
442
|
.. admonition:: Example:
|
@@ -489,7 +490,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
489
490
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
490
491
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
491
492
|
#other-client--per-operation-configuration>`__.
|
492
|
-
:
|
493
|
+
:return: An iterable (auto-paging) response of BlobProperties.
|
493
494
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.FilteredBlob]
|
494
495
|
"""
|
495
496
|
|
@@ -538,7 +539,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
538
539
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
539
540
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
540
541
|
#other-client--per-operation-configuration>`__.
|
541
|
-
:
|
542
|
+
:return: A container client to interact with the newly created container.
|
542
543
|
:rtype: ~azure.storage.blob.ContainerClient
|
543
544
|
|
544
545
|
.. admonition:: Example:
|
@@ -600,6 +601,8 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
600
601
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
601
602
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
602
603
|
#other-client--per-operation-configuration>`__.
|
604
|
+
:return: None
|
605
|
+
:rtype: None
|
603
606
|
|
604
607
|
.. admonition:: Example:
|
605
608
|
|
@@ -638,7 +641,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
638
641
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
639
642
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
640
643
|
#other-client--per-operation-configuration>`__.
|
641
|
-
:
|
644
|
+
:return: A container client for the renamed container.
|
642
645
|
:rtype: ~azure.storage.blob.ContainerClient
|
643
646
|
"""
|
644
647
|
renamed_container = self.get_container_client(new_name)
|
@@ -677,7 +680,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
677
680
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
678
681
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
679
682
|
#other-client--per-operation-configuration>`__.
|
680
|
-
:
|
683
|
+
:return: The undeleted ContainerClient.
|
681
684
|
:rtype: ~azure.storage.blob.ContainerClient
|
682
685
|
"""
|
683
686
|
new_name = kwargs.pop('new_name', None)
|
@@ -701,7 +704,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
701
704
|
The container. This can either be the name of the container,
|
702
705
|
or an instance of ContainerProperties.
|
703
706
|
:type container: str or ~azure.storage.blob.ContainerProperties
|
704
|
-
:
|
707
|
+
:return: A ContainerClient.
|
705
708
|
:rtype: ~azure.storage.blob.ContainerClient
|
706
709
|
|
707
710
|
.. admonition:: Example:
|
@@ -750,7 +753,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
750
753
|
:type snapshot: str or dict(str, Any)
|
751
754
|
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
|
752
755
|
specifies the version of the blob to operate on.
|
753
|
-
:
|
756
|
+
:return: A BlobClient.
|
754
757
|
:rtype: ~azure.storage.blob.BlobClient
|
755
758
|
|
756
759
|
.. admonition:: Example:
|