azure-storage-blob 12.25.1__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 +94 -41
- azure/storage/blob/_blob_client_helpers.py +19 -4
- 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} +7 -25
- 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 +11 -14
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +40 -64
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +18 -20
- azure/storage/blob/_generated/aio/operations/_container_operations.py +21 -43
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +18 -27
- azure/storage/blob/_generated/aio/operations/_service_operations.py +11 -22
- azure/storage/blob/_generated/models/__init__.py +2 -0
- azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +6 -0
- azure/storage/blob/_generated/models/_models_py3.py +30 -9
- azure/storage/blob/_generated/operations/_append_blob_operations.py +19 -20
- azure/storage/blob/_generated/operations/_blob_operations.py +68 -89
- azure/storage/blob/_generated/operations/_block_blob_operations.py +31 -27
- azure/storage/blob/_generated/operations/_container_operations.py +40 -62
- azure/storage/blob/_generated/operations/_page_blob_operations.py +31 -37
- azure/storage/blob/_generated/operations/_service_operations.py +20 -32
- azure/storage/blob/_lease.py +1 -0
- azure/storage/blob/_list_blobs_helper.py +1 -1
- azure/storage/blob/_quick_query_helper.py +20 -24
- azure/storage/blob/_serialize.py +2 -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 +82 -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 +67 -71
- azure/storage/blob/_shared/uploads.py +56 -49
- azure/storage/blob/_shared/uploads_async.py +70 -58
- azure/storage/blob/_shared_access_signature.py +3 -1
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +3 -2
- azure/storage/blob/aio/_blob_client_async.py +241 -44
- 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 +194 -0
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/METADATA +4 -5
- azure_storage_blob-12.27.0b1.dist-info/RECORD +86 -0
- azure_storage_blob-12.25.1.dist-info/RECORD +0 -84
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/WHEEL +0 -0
- {azure_storage_blob-12.25.1.dist-info → azure_storage_blob-12.27.0b1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -6,8 +6,8 @@
|
|
6
6
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
|
+
from collections.abc import MutableMapping
|
9
10
|
import datetime
|
10
|
-
import sys
|
11
11
|
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
|
12
12
|
|
13
13
|
from azure.core import PipelineClient
|
@@ -26,12 +26,8 @@ from azure.core.utils import case_insensitive_dict
|
|
26
26
|
|
27
27
|
from .. import models as _models
|
28
28
|
from .._configuration import AzureBlobStorageConfiguration
|
29
|
-
from ..
|
29
|
+
from .._utils.serialization import Deserializer, Serializer
|
30
30
|
|
31
|
-
if sys.version_info >= (3, 9):
|
32
|
-
from collections.abc import MutableMapping
|
33
|
-
else:
|
34
|
-
from typing import MutableMapping # type: ignore
|
35
31
|
T = TypeVar("T")
|
36
32
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
37
33
|
|
@@ -75,7 +71,7 @@ def build_create_request(
|
|
75
71
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
76
72
|
|
77
73
|
blob_type: Literal["PageBlob"] = kwargs.pop("blob_type", _headers.pop("x-ms-blob-type", "PageBlob"))
|
78
|
-
version: Literal["2025-
|
74
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
79
75
|
accept = _headers.pop("Accept", "application/xml")
|
80
76
|
|
81
77
|
# Construct URL
|
@@ -193,7 +189,7 @@ def build_upload_pages_request(
|
|
193
189
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
194
190
|
page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
|
195
191
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
196
|
-
version: Literal["2025-
|
192
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
197
193
|
accept = _headers.pop("Accept", "application/xml")
|
198
194
|
|
199
195
|
# Construct URL
|
@@ -299,7 +295,7 @@ def build_clear_pages_request(
|
|
299
295
|
|
300
296
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
301
297
|
page_write: Literal["clear"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "clear"))
|
302
|
-
version: Literal["2025-
|
298
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
303
299
|
accept = _headers.pop("Accept", "application/xml")
|
304
300
|
|
305
301
|
# Construct URL
|
@@ -391,6 +387,7 @@ def build_upload_pages_from_url_request(
|
|
391
387
|
source_if_none_match: Optional[str] = None,
|
392
388
|
request_id_parameter: Optional[str] = None,
|
393
389
|
copy_source_authorization: Optional[str] = None,
|
390
|
+
file_request_intent: Optional[Union[str, _models.FileShareTokenIntent]] = None,
|
394
391
|
**kwargs: Any
|
395
392
|
) -> HttpRequest:
|
396
393
|
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -398,7 +395,7 @@ def build_upload_pages_from_url_request(
|
|
398
395
|
|
399
396
|
comp: Literal["page"] = kwargs.pop("comp", _params.pop("comp", "page"))
|
400
397
|
page_write: Literal["update"] = kwargs.pop("page_write", _headers.pop("x-ms-page-write", "update"))
|
401
|
-
version: Literal["2025-
|
398
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
402
399
|
accept = _headers.pop("Accept", "application/xml")
|
403
400
|
|
404
401
|
# Construct URL
|
@@ -479,6 +476,8 @@ def build_upload_pages_from_url_request(
|
|
479
476
|
_headers["x-ms-copy-source-authorization"] = _SERIALIZER.header(
|
480
477
|
"copy_source_authorization", copy_source_authorization, "str"
|
481
478
|
)
|
479
|
+
if file_request_intent is not None:
|
480
|
+
_headers["x-ms-file-request-intent"] = _SERIALIZER.header("file_request_intent", file_request_intent, "str")
|
482
481
|
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
|
483
482
|
|
484
483
|
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
|
@@ -505,7 +504,7 @@ def build_get_page_ranges_request(
|
|
505
504
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
506
505
|
|
507
506
|
comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
|
508
|
-
version: Literal["2025-
|
507
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
509
508
|
accept = _headers.pop("Accept", "application/xml")
|
510
509
|
|
511
510
|
# Construct URL
|
@@ -573,7 +572,7 @@ def build_get_page_ranges_diff_request(
|
|
573
572
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
574
573
|
|
575
574
|
comp: Literal["pagelist"] = kwargs.pop("comp", _params.pop("comp", "pagelist"))
|
576
|
-
version: Literal["2025-
|
575
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
577
576
|
accept = _headers.pop("Accept", "application/xml")
|
578
577
|
|
579
578
|
# Construct URL
|
@@ -644,7 +643,7 @@ def build_resize_request(
|
|
644
643
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
645
644
|
|
646
645
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
647
|
-
version: Literal["2025-
|
646
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
648
647
|
accept = _headers.pop("Accept", "application/xml")
|
649
648
|
|
650
649
|
# Construct URL
|
@@ -711,7 +710,7 @@ def build_update_sequence_number_request(
|
|
711
710
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
712
711
|
|
713
712
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
714
|
-
version: Literal["2025-
|
713
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
715
714
|
accept = _headers.pop("Accept", "application/xml")
|
716
715
|
|
717
716
|
# Construct URL
|
@@ -770,7 +769,7 @@ def build_copy_incremental_request(
|
|
770
769
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
771
770
|
|
772
771
|
comp: Literal["incrementalcopy"] = kwargs.pop("comp", _params.pop("comp", "incrementalcopy"))
|
773
|
-
version: Literal["2025-
|
772
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
774
773
|
accept = _headers.pop("Accept", "application/xml")
|
775
774
|
|
776
775
|
# Construct URL
|
@@ -818,7 +817,7 @@ class PageBlobOperations:
|
|
818
817
|
|
819
818
|
models = _models
|
820
819
|
|
821
|
-
def __init__(self, *args, **kwargs):
|
820
|
+
def __init__(self, *args, **kwargs) -> None:
|
822
821
|
input_args = list(args)
|
823
822
|
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
824
823
|
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
@@ -846,7 +845,6 @@ class PageBlobOperations:
|
|
846
845
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
847
846
|
**kwargs: Any
|
848
847
|
) -> None:
|
849
|
-
# pylint: disable=line-too-long
|
850
848
|
"""The Create operation creates a new page blob.
|
851
849
|
|
852
850
|
:param content_length: The length of the request. Required.
|
@@ -856,7 +854,7 @@ class PageBlobOperations:
|
|
856
854
|
:type blob_content_length: int
|
857
855
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
858
856
|
:code:`<a
|
859
|
-
href="https://
|
857
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
860
858
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
861
859
|
:type timeout: int
|
862
860
|
:param tier: Optional. Indicates the tier to be set on the page blob. Known values are: "P4",
|
@@ -1046,7 +1044,6 @@ class PageBlobOperations:
|
|
1046
1044
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1047
1045
|
**kwargs: Any
|
1048
1046
|
) -> None:
|
1049
|
-
# pylint: disable=line-too-long
|
1050
1047
|
"""The Upload Pages operation writes a range of pages to a page blob.
|
1051
1048
|
|
1052
1049
|
:param content_length: The length of the request. Required.
|
@@ -1061,7 +1058,7 @@ class PageBlobOperations:
|
|
1061
1058
|
:type transactional_content_crc64: bytes
|
1062
1059
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1063
1060
|
:code:`<a
|
1064
|
-
href="https://
|
1061
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1065
1062
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1066
1063
|
:type timeout: int
|
1067
1064
|
:param range: Return only the bytes of the blob in the specified range. Default value is None.
|
@@ -1234,14 +1231,13 @@ class PageBlobOperations:
|
|
1234
1231
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1235
1232
|
**kwargs: Any
|
1236
1233
|
) -> None:
|
1237
|
-
# pylint: disable=line-too-long
|
1238
1234
|
"""The Clear Pages operation clears a set of pages from a page blob.
|
1239
1235
|
|
1240
1236
|
:param content_length: The length of the request. Required.
|
1241
1237
|
:type content_length: int
|
1242
1238
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1243
1239
|
:code:`<a
|
1244
|
-
href="https://
|
1240
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1245
1241
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1246
1242
|
:type timeout: int
|
1247
1243
|
:param range: Return only the bytes of the blob in the specified range. Default value is None.
|
@@ -1385,6 +1381,7 @@ class PageBlobOperations:
|
|
1385
1381
|
timeout: Optional[int] = None,
|
1386
1382
|
request_id_parameter: Optional[str] = None,
|
1387
1383
|
copy_source_authorization: Optional[str] = None,
|
1384
|
+
file_request_intent: Optional[Union[str, _models.FileShareTokenIntent]] = None,
|
1388
1385
|
cpk_info: Optional[_models.CpkInfo] = None,
|
1389
1386
|
cpk_scope_info: Optional[_models.CpkScopeInfo] = None,
|
1390
1387
|
lease_access_conditions: Optional[_models.LeaseAccessConditions] = None,
|
@@ -1393,7 +1390,6 @@ class PageBlobOperations:
|
|
1393
1390
|
source_modified_access_conditions: Optional[_models.SourceModifiedAccessConditions] = None,
|
1394
1391
|
**kwargs: Any
|
1395
1392
|
) -> None:
|
1396
|
-
# pylint: disable=line-too-long
|
1397
1393
|
"""The Upload Pages operation writes a range of pages to a page blob where the contents are read
|
1398
1394
|
from a URL.
|
1399
1395
|
|
@@ -1415,7 +1411,7 @@ class PageBlobOperations:
|
|
1415
1411
|
:type source_contentcrc64: bytes
|
1416
1412
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1417
1413
|
:code:`<a
|
1418
|
-
href="https://
|
1414
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1419
1415
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1420
1416
|
:type timeout: int
|
1421
1417
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -1425,6 +1421,8 @@ class PageBlobOperations:
|
|
1425
1421
|
:param copy_source_authorization: Only Bearer type is supported. Credentials should be a valid
|
1426
1422
|
OAuth access token to copy source. Default value is None.
|
1427
1423
|
:type copy_source_authorization: str
|
1424
|
+
:param file_request_intent: Valid value is backup. "backup" Default value is None.
|
1425
|
+
:type file_request_intent: str or ~azure.storage.blob.models.FileShareTokenIntent
|
1428
1426
|
:param cpk_info: Parameter group. Default value is None.
|
1429
1427
|
:type cpk_info: ~azure.storage.blob.models.CpkInfo
|
1430
1428
|
:param cpk_scope_info: Parameter group. Default value is None.
|
@@ -1529,6 +1527,7 @@ class PageBlobOperations:
|
|
1529
1527
|
source_if_none_match=_source_if_none_match,
|
1530
1528
|
request_id_parameter=request_id_parameter,
|
1531
1529
|
copy_source_authorization=copy_source_authorization,
|
1530
|
+
file_request_intent=file_request_intent,
|
1532
1531
|
comp=comp,
|
1533
1532
|
page_write=page_write,
|
1534
1533
|
version=self._config.version,
|
@@ -1588,19 +1587,18 @@ class PageBlobOperations:
|
|
1588
1587
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1589
1588
|
**kwargs: Any
|
1590
1589
|
) -> _models.PageList:
|
1591
|
-
# pylint: disable=line-too-long
|
1592
1590
|
"""The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot
|
1593
1591
|
of a page blob.
|
1594
1592
|
|
1595
1593
|
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
1596
1594
|
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
1597
1595
|
see :code:`<a
|
1598
|
-
href="https://
|
1596
|
+
href="https://learn.microsoft.com/rest/api/storageservices/creating-a-snapshot-of-a-blob">Creating
|
1599
1597
|
a Snapshot of a Blob.</a>`. Default value is None.
|
1600
1598
|
:type snapshot: str
|
1601
1599
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1602
1600
|
:code:`<a
|
1603
|
-
href="https://
|
1601
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1604
1602
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1605
1603
|
:type timeout: int
|
1606
1604
|
:param range: Return only the bytes of the blob in the specified range. Default value is None.
|
@@ -1728,19 +1726,18 @@ class PageBlobOperations:
|
|
1728
1726
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1729
1727
|
**kwargs: Any
|
1730
1728
|
) -> _models.PageList:
|
1731
|
-
# pylint: disable=line-too-long
|
1732
1729
|
"""The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that
|
1733
1730
|
were changed between target blob and previous snapshot.
|
1734
1731
|
|
1735
1732
|
:param snapshot: The snapshot parameter is an opaque DateTime value that, when present,
|
1736
1733
|
specifies the blob snapshot to retrieve. For more information on working with blob snapshots,
|
1737
1734
|
see :code:`<a
|
1738
|
-
href="https://
|
1735
|
+
href="https://learn.microsoft.com/rest/api/storageservices/creating-a-snapshot-of-a-blob">Creating
|
1739
1736
|
a Snapshot of a Blob.</a>`. Default value is None.
|
1740
1737
|
:type snapshot: str
|
1741
1738
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1742
1739
|
:code:`<a
|
1743
|
-
href="https://
|
1740
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1744
1741
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1745
1742
|
:type timeout: int
|
1746
1743
|
:param prevsnapshot: Optional in version 2015-07-08 and newer. The prevsnapshot parameter is a
|
@@ -1879,7 +1876,6 @@ class PageBlobOperations:
|
|
1879
1876
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
1880
1877
|
**kwargs: Any
|
1881
1878
|
) -> None:
|
1882
|
-
# pylint: disable=line-too-long
|
1883
1879
|
"""Resize the Blob.
|
1884
1880
|
|
1885
1881
|
:param blob_content_length: This header specifies the maximum size for the page blob, up to 1
|
@@ -1887,7 +1883,7 @@ class PageBlobOperations:
|
|
1887
1883
|
:type blob_content_length: int
|
1888
1884
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
1889
1885
|
:code:`<a
|
1890
|
-
href="https://
|
1886
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
1891
1887
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
1892
1888
|
:type timeout: int
|
1893
1889
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -2006,7 +2002,6 @@ class PageBlobOperations:
|
|
2006
2002
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2007
2003
|
**kwargs: Any
|
2008
2004
|
) -> None:
|
2009
|
-
# pylint: disable=line-too-long
|
2010
2005
|
"""Update the sequence number of the blob.
|
2011
2006
|
|
2012
2007
|
:param sequence_number_action: Required if the x-ms-blob-sequence-number header is set for the
|
@@ -2016,7 +2011,7 @@ class PageBlobOperations:
|
|
2016
2011
|
:type sequence_number_action: str or ~azure.storage.blob.models.SequenceNumberActionType
|
2017
2012
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
2018
2013
|
:code:`<a
|
2019
|
-
href="https://
|
2014
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
2020
2015
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
2021
2016
|
:type timeout: int
|
2022
2017
|
:param blob_sequence_number: Set for page blobs only. The sequence number is a user-controlled
|
@@ -2120,7 +2115,6 @@ class PageBlobOperations:
|
|
2120
2115
|
modified_access_conditions: Optional[_models.ModifiedAccessConditions] = None,
|
2121
2116
|
**kwargs: Any
|
2122
2117
|
) -> None:
|
2123
|
-
# pylint: disable=line-too-long
|
2124
2118
|
"""The Copy Incremental operation copies a snapshot of the source page blob to a destination page
|
2125
2119
|
blob. The snapshot is copied such that only the differential changes between the previously
|
2126
2120
|
copied snapshot are transferred to the destination. The copied snapshots are complete copies of
|
@@ -2134,7 +2128,7 @@ class PageBlobOperations:
|
|
2134
2128
|
:type copy_source: str
|
2135
2129
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
2136
2130
|
:code:`<a
|
2137
|
-
href="https://
|
2131
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
2138
2132
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
2139
2133
|
:type timeout: int
|
2140
2134
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=line-too-long,useless-suppression,too-many-lines
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# Code generated by Microsoft (R) AutoRest Code Generator.
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
|
-
import
|
9
|
+
from collections.abc import MutableMapping
|
10
10
|
from typing import Any, Callable, Dict, IO, Iterator, List, Literal, Optional, TypeVar, Union
|
11
11
|
|
12
12
|
from azure.core import PipelineClient
|
@@ -27,12 +27,8 @@ from azure.core.utils import case_insensitive_dict
|
|
27
27
|
|
28
28
|
from .. import models as _models
|
29
29
|
from .._configuration import AzureBlobStorageConfiguration
|
30
|
-
from ..
|
30
|
+
from .._utils.serialization import Deserializer, Serializer
|
31
31
|
|
32
|
-
if sys.version_info >= (3, 9):
|
33
|
-
from collections.abc import MutableMapping
|
34
|
-
else:
|
35
|
-
from typing import MutableMapping # type: ignore
|
36
32
|
T = TypeVar("T")
|
37
33
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
|
38
34
|
|
@@ -49,7 +45,7 @@ def build_set_properties_request(
|
|
49
45
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
50
46
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
51
47
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
52
|
-
version: Literal["2025-
|
48
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
53
49
|
accept = _headers.pop("Accept", "application/xml")
|
54
50
|
|
55
51
|
# Construct URL
|
@@ -85,7 +81,7 @@ def build_get_properties_request(
|
|
85
81
|
|
86
82
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
87
83
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
88
|
-
version: Literal["2025-
|
84
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
89
85
|
accept = _headers.pop("Accept", "application/xml")
|
90
86
|
|
91
87
|
# Construct URL
|
@@ -119,7 +115,7 @@ def build_get_statistics_request(
|
|
119
115
|
|
120
116
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
121
117
|
comp: Literal["stats"] = kwargs.pop("comp", _params.pop("comp", "stats"))
|
122
|
-
version: Literal["2025-
|
118
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
123
119
|
accept = _headers.pop("Accept", "application/xml")
|
124
120
|
|
125
121
|
# Construct URL
|
@@ -160,7 +156,7 @@ def build_list_containers_segment_request(
|
|
160
156
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
161
157
|
|
162
158
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
163
|
-
version: Literal["2025-
|
159
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
164
160
|
accept = _headers.pop("Accept", "application/xml")
|
165
161
|
|
166
162
|
# Construct URL
|
@@ -202,7 +198,7 @@ def build_get_user_delegation_key_request(
|
|
202
198
|
restype: Literal["service"] = kwargs.pop("restype", _params.pop("restype", "service"))
|
203
199
|
comp: Literal["userdelegationkey"] = kwargs.pop("comp", _params.pop("comp", "userdelegationkey"))
|
204
200
|
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
|
205
|
-
version: Literal["2025-
|
201
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
206
202
|
accept = _headers.pop("Accept", "application/xml")
|
207
203
|
|
208
204
|
# Construct URL
|
@@ -238,7 +234,7 @@ def build_get_account_info_request(
|
|
238
234
|
|
239
235
|
restype: Literal["account"] = kwargs.pop("restype", _params.pop("restype", "account"))
|
240
236
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
241
|
-
version: Literal["2025-
|
237
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
242
238
|
accept = _headers.pop("Accept", "application/xml")
|
243
239
|
|
244
240
|
# Construct URL
|
@@ -278,7 +274,7 @@ def build_submit_batch_request(
|
|
278
274
|
|
279
275
|
comp: Literal["batch"] = kwargs.pop("comp", _params.pop("comp", "batch"))
|
280
276
|
multipart_content_type: Optional[str] = kwargs.pop("multipart_content_type", _headers.pop("Content-Type", None))
|
281
|
-
version: Literal["2025-
|
277
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
282
278
|
accept = _headers.pop("Accept", "application/xml")
|
283
279
|
|
284
280
|
# Construct URL
|
@@ -321,7 +317,7 @@ def build_filter_blobs_request(
|
|
321
317
|
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
|
322
318
|
|
323
319
|
comp: Literal["blobs"] = kwargs.pop("comp", _params.pop("comp", "blobs"))
|
324
|
-
version: Literal["2025-
|
320
|
+
version: Literal["2025-11-05"] = kwargs.pop("version", _headers.pop("x-ms-version", "2025-11-05"))
|
325
321
|
accept = _headers.pop("Accept", "application/xml")
|
326
322
|
|
327
323
|
# Construct URL
|
@@ -366,7 +362,7 @@ class ServiceOperations:
|
|
366
362
|
|
367
363
|
models = _models
|
368
364
|
|
369
|
-
def __init__(self, *args, **kwargs):
|
365
|
+
def __init__(self, *args, **kwargs) -> None:
|
370
366
|
input_args = list(args)
|
371
367
|
self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
372
368
|
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
@@ -381,7 +377,6 @@ class ServiceOperations:
|
|
381
377
|
request_id_parameter: Optional[str] = None,
|
382
378
|
**kwargs: Any
|
383
379
|
) -> None:
|
384
|
-
# pylint: disable=line-too-long
|
385
380
|
"""Sets properties for a storage account's Blob service endpoint, including properties for Storage
|
386
381
|
Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
387
382
|
|
@@ -389,7 +384,7 @@ class ServiceOperations:
|
|
389
384
|
:type storage_service_properties: ~azure.storage.blob.models.StorageServiceProperties
|
390
385
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
391
386
|
:code:`<a
|
392
|
-
href="https://
|
387
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
393
388
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
394
389
|
:type timeout: int
|
395
390
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -458,13 +453,12 @@ class ServiceOperations:
|
|
458
453
|
def get_properties(
|
459
454
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
460
455
|
) -> _models.StorageServiceProperties:
|
461
|
-
# pylint: disable=line-too-long
|
462
456
|
"""gets the properties of a storage account's Blob service, including properties for Storage
|
463
457
|
Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
464
458
|
|
465
459
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
466
460
|
:code:`<a
|
467
|
-
href="https://
|
461
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
468
462
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
469
463
|
:type timeout: int
|
470
464
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -532,14 +526,13 @@ class ServiceOperations:
|
|
532
526
|
def get_statistics(
|
533
527
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
534
528
|
) -> _models.StorageServiceStats:
|
535
|
-
# pylint: disable=line-too-long
|
536
529
|
"""Retrieves statistics related to replication for the Blob service. It is only available on the
|
537
530
|
secondary location endpoint when read-access geo-redundant replication is enabled for the
|
538
531
|
storage account.
|
539
532
|
|
540
533
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
541
534
|
:code:`<a
|
542
|
-
href="https://
|
535
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
543
536
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
544
537
|
:type timeout: int
|
545
538
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -615,7 +608,6 @@ class ServiceOperations:
|
|
615
608
|
request_id_parameter: Optional[str] = None,
|
616
609
|
**kwargs: Any
|
617
610
|
) -> _models.ListContainersSegmentResponse:
|
618
|
-
# pylint: disable=line-too-long
|
619
611
|
"""The List Containers Segment operation returns a list of the containers under the specified
|
620
612
|
account.
|
621
613
|
|
@@ -641,7 +633,7 @@ class ServiceOperations:
|
|
641
633
|
:type include: list[str or ~azure.storage.blob.models.ListContainersIncludeType]
|
642
634
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
643
635
|
:code:`<a
|
644
|
-
href="https://
|
636
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
645
637
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
646
638
|
:type timeout: int
|
647
639
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -715,7 +707,6 @@ class ServiceOperations:
|
|
715
707
|
request_id_parameter: Optional[str] = None,
|
716
708
|
**kwargs: Any
|
717
709
|
) -> _models.UserDelegationKey:
|
718
|
-
# pylint: disable=line-too-long
|
719
710
|
"""Retrieves a user delegation key for the Blob service. This is only a valid operation when using
|
720
711
|
bearer token authentication.
|
721
712
|
|
@@ -723,7 +714,7 @@ class ServiceOperations:
|
|
723
714
|
:type key_info: ~azure.storage.blob.models.KeyInfo
|
724
715
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
725
716
|
:code:`<a
|
726
|
-
href="https://
|
717
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
727
718
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
728
719
|
:type timeout: int
|
729
720
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -797,12 +788,11 @@ class ServiceOperations:
|
|
797
788
|
def get_account_info( # pylint: disable=inconsistent-return-statements
|
798
789
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
799
790
|
) -> None:
|
800
|
-
# pylint: disable=line-too-long
|
801
791
|
"""Returns the sku name and account kind.
|
802
792
|
|
803
793
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
804
794
|
:code:`<a
|
805
|
-
href="https://
|
795
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
806
796
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
807
797
|
:type timeout: int
|
808
798
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -875,7 +865,6 @@ class ServiceOperations:
|
|
875
865
|
request_id_parameter: Optional[str] = None,
|
876
866
|
**kwargs: Any
|
877
867
|
) -> Iterator[bytes]:
|
878
|
-
# pylint: disable=line-too-long
|
879
868
|
"""The Batch operation allows multiple API calls to be embedded into a single HTTP request.
|
880
869
|
|
881
870
|
:param content_length: The length of the request. Required.
|
@@ -884,7 +873,7 @@ class ServiceOperations:
|
|
884
873
|
:type body: IO[bytes]
|
885
874
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
886
875
|
:code:`<a
|
887
|
-
href="https://
|
876
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
888
877
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
889
878
|
:type timeout: int
|
890
879
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
@@ -968,14 +957,13 @@ class ServiceOperations:
|
|
968
957
|
include: Optional[List[Union[str, _models.FilterBlobsIncludeItem]]] = None,
|
969
958
|
**kwargs: Any
|
970
959
|
) -> _models.FilterBlobSegment:
|
971
|
-
# pylint: disable=line-too-long
|
972
960
|
"""The Filter Blobs operation enables callers to list blobs across all containers whose tags match
|
973
961
|
a given search expression. Filter blobs searches across all containers within a storage
|
974
962
|
account but can be scoped within the expression to a single container.
|
975
963
|
|
976
964
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
977
965
|
:code:`<a
|
978
|
-
href="https://
|
966
|
+
href="https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations">Setting
|
979
967
|
Timeouts for Blob Service Operations.</a>`. Default value is None.
|
980
968
|
:type timeout: int
|
981
969
|
:param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character
|
azure/storage/blob/_lease.py
CHANGED
@@ -102,6 +102,7 @@ class BlobLeaseClient(): # pylint: disable=client-accepts-api-version-keyword
|
|
102
102
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
103
103
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
104
104
|
#other-client--per-operation-configuration>`__.
|
105
|
+
:return: None
|
105
106
|
:rtype: None
|
106
107
|
"""
|
107
108
|
mod_conditions = get_modify_conditions(kwargs)
|
@@ -18,7 +18,7 @@ from ._deserialize import (
|
|
18
18
|
parse_tags
|
19
19
|
)
|
20
20
|
from ._generated.models import BlobItemInternal, BlobPrefix as GenBlobPrefix, FilterBlobItem
|
21
|
-
from ._generated.
|
21
|
+
from ._generated._utils.serialization import Deserializer
|
22
22
|
from ._models import BlobProperties, FilteredBlob
|
23
23
|
from ._shared.models import DictMixin
|
24
24
|
from ._shared.response_handlers import (
|