azure-storage-blob 12.24.0b1__py3-none-any.whl → 12.25.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/_blob_client.py +6 -3
- azure/storage/blob/_download.py +2 -2
- azure/storage/blob/_generated/__init__.py +9 -3
- azure/storage/blob/_generated/_configuration.py +1 -1
- azure/storage/blob/_generated/_patch.py +16 -29
- azure/storage/blob/_generated/_serialization.py +52 -117
- azure/storage/blob/_generated/aio/__init__.py +9 -3
- azure/storage/blob/_generated/aio/_configuration.py +1 -1
- azure/storage/blob/_generated/aio/_patch.py +16 -29
- azure/storage/blob/_generated/aio/operations/__init__.py +14 -8
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +17 -15
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +55 -52
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +21 -18
- azure/storage/blob/_generated/aio/operations/_container_operations.py +41 -38
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +26 -23
- azure/storage/blob/_generated/aio/operations/_patch.py +2 -8
- azure/storage/blob/_generated/aio/operations/_service_operations.py +19 -17
- azure/storage/blob/_generated/models/__init__.py +91 -80
- azure/storage/blob/_generated/models/_models_py3.py +4 -5
- azure/storage/blob/_generated/models/_patch.py +2 -8
- azure/storage/blob/_generated/operations/__init__.py +14 -8
- azure/storage/blob/_generated/operations/_append_blob_operations.py +14 -12
- azure/storage/blob/_generated/operations/_blob_operations.py +34 -32
- azure/storage/blob/_generated/operations/_block_blob_operations.py +16 -14
- azure/storage/blob/_generated/operations/_container_operations.py +28 -26
- azure/storage/blob/_generated/operations/_page_blob_operations.py +19 -17
- azure/storage/blob/_generated/operations/_patch.py +2 -8
- azure/storage/blob/_generated/operations/_service_operations.py +18 -16
- azure/storage/blob/_models.py +1 -1
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/authentication.py +1 -1
- azure/storage/blob/_shared/base_client.py +1 -1
- azure/storage/blob/_shared/parser.py +2 -10
- azure/storage/blob/_shared/policies_async.py +2 -2
- azure/storage/blob/_shared/request_handlers.py +3 -4
- azure/storage/blob/_shared/response_handlers.py +2 -2
- azure/storage/blob/_shared/shared_access_signature.py +2 -2
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/_blob_client_async.py +6 -3
- azure/storage/blob/aio/_download_async.py +3 -3
- {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0.dist-info}/METADATA +21 -21
- {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0.dist-info}/RECORD +45 -45
- {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0.dist-info}/WHEEL +1 -1
- {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -8,8 +8,9 @@
|
|
8
8
|
# --------------------------------------------------------------------------
|
9
9
|
import datetime
|
10
10
|
import sys
|
11
|
-
from typing import Any, Callable, Dict, IO, Literal, Optional,
|
11
|
+
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
|
12
12
|
|
13
|
+
from azure.core import AsyncPipelineClient
|
13
14
|
from azure.core.exceptions import (
|
14
15
|
ClientAuthenticationError,
|
15
16
|
HttpResponseError,
|
@@ -24,6 +25,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
|
|
24
25
|
from azure.core.utils import case_insensitive_dict
|
25
26
|
|
26
27
|
from ... import models as _models
|
28
|
+
from ..._serialization import Deserializer, Serializer
|
27
29
|
from ...operations._block_blob_operations import (
|
28
30
|
build_commit_block_list_request,
|
29
31
|
build_get_block_list_request,
|
@@ -32,11 +34,12 @@ from ...operations._block_blob_operations import (
|
|
32
34
|
build_stage_block_request,
|
33
35
|
build_upload_request,
|
34
36
|
)
|
37
|
+
from .._configuration import AzureBlobStorageConfiguration
|
35
38
|
|
36
39
|
if sys.version_info >= (3, 9):
|
37
40
|
from collections.abc import MutableMapping
|
38
41
|
else:
|
39
|
-
from typing import MutableMapping # type: ignore
|
42
|
+
from typing import MutableMapping # type: ignore
|
40
43
|
T = TypeVar("T")
|
41
44
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
|
42
45
|
|
@@ -55,13 +58,13 @@ class BlockBlobOperations:
|
|
55
58
|
|
56
59
|
def __init__(self, *args, **kwargs) -> None:
|
57
60
|
input_args = list(args)
|
58
|
-
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
|
59
|
-
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
|
60
|
-
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
61
|
-
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
61
|
+
self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
62
|
+
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
63
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
64
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
62
65
|
|
63
66
|
@distributed_trace_async
|
64
|
-
async def upload(
|
67
|
+
async def upload(
|
65
68
|
self,
|
66
69
|
content_length: int,
|
67
70
|
body: IO[bytes],
|
@@ -154,7 +157,7 @@ class BlockBlobOperations:
|
|
154
157
|
:rtype: None
|
155
158
|
:raises ~azure.core.exceptions.HttpResponseError:
|
156
159
|
"""
|
157
|
-
error_map: MutableMapping
|
160
|
+
error_map: MutableMapping = {
|
158
161
|
401: ClientAuthenticationError,
|
159
162
|
404: ResourceNotFoundError,
|
160
163
|
409: ResourceExistsError,
|
@@ -288,7 +291,7 @@ class BlockBlobOperations:
|
|
288
291
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
289
292
|
|
290
293
|
@distributed_trace_async
|
291
|
-
async def put_blob_from_url(
|
294
|
+
async def put_blob_from_url(
|
292
295
|
self,
|
293
296
|
content_length: int,
|
294
297
|
copy_source: str,
|
@@ -381,7 +384,7 @@ class BlockBlobOperations:
|
|
381
384
|
:rtype: None
|
382
385
|
:raises ~azure.core.exceptions.HttpResponseError:
|
383
386
|
"""
|
384
|
-
error_map: MutableMapping
|
387
|
+
error_map: MutableMapping = {
|
385
388
|
401: ClientAuthenticationError,
|
386
389
|
404: ResourceNotFoundError,
|
387
390
|
409: ResourceExistsError,
|
@@ -523,7 +526,7 @@ class BlockBlobOperations:
|
|
523
526
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
524
527
|
|
525
528
|
@distributed_trace_async
|
526
|
-
async def stage_block(
|
529
|
+
async def stage_block(
|
527
530
|
self,
|
528
531
|
block_id: str,
|
529
532
|
content_length: int,
|
@@ -582,7 +585,7 @@ class BlockBlobOperations:
|
|
582
585
|
:rtype: None
|
583
586
|
:raises ~azure.core.exceptions.HttpResponseError:
|
584
587
|
"""
|
585
|
-
error_map: MutableMapping
|
588
|
+
error_map: MutableMapping = {
|
586
589
|
401: ClientAuthenticationError,
|
587
590
|
404: ResourceNotFoundError,
|
588
591
|
409: ResourceExistsError,
|
@@ -676,7 +679,7 @@ class BlockBlobOperations:
|
|
676
679
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
677
680
|
|
678
681
|
@distributed_trace_async
|
679
|
-
async def stage_block_from_url(
|
682
|
+
async def stage_block_from_url(
|
680
683
|
self,
|
681
684
|
block_id: str,
|
682
685
|
content_length: int,
|
@@ -738,7 +741,7 @@ class BlockBlobOperations:
|
|
738
741
|
:rtype: None
|
739
742
|
:raises ~azure.core.exceptions.HttpResponseError:
|
740
743
|
"""
|
741
|
-
error_map: MutableMapping
|
744
|
+
error_map: MutableMapping = {
|
742
745
|
401: ClientAuthenticationError,
|
743
746
|
404: ResourceNotFoundError,
|
744
747
|
409: ResourceExistsError,
|
@@ -839,7 +842,7 @@ class BlockBlobOperations:
|
|
839
842
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
840
843
|
|
841
844
|
@distributed_trace_async
|
842
|
-
async def commit_block_list(
|
845
|
+
async def commit_block_list(
|
843
846
|
self,
|
844
847
|
blocks: _models.BlockLookupList,
|
845
848
|
timeout: Optional[int] = None,
|
@@ -922,7 +925,7 @@ class BlockBlobOperations:
|
|
922
925
|
:rtype: None
|
923
926
|
:raises ~azure.core.exceptions.HttpResponseError:
|
924
927
|
"""
|
925
|
-
error_map: MutableMapping
|
928
|
+
error_map: MutableMapping = {
|
926
929
|
401: ClientAuthenticationError,
|
927
930
|
404: ResourceNotFoundError,
|
928
931
|
409: ResourceExistsError,
|
@@ -1094,7 +1097,7 @@ class BlockBlobOperations:
|
|
1094
1097
|
:rtype: ~azure.storage.blob.models.BlockList
|
1095
1098
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1096
1099
|
"""
|
1097
|
-
error_map: MutableMapping
|
1100
|
+
error_map: MutableMapping = {
|
1098
1101
|
401: ClientAuthenticationError,
|
1099
1102
|
404: ResourceNotFoundError,
|
1100
1103
|
409: ResourceExistsError,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -7,8 +7,9 @@
|
|
7
7
|
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
8
|
# --------------------------------------------------------------------------
|
9
9
|
import sys
|
10
|
-
from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional,
|
10
|
+
from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union
|
11
11
|
|
12
|
+
from azure.core import AsyncPipelineClient
|
12
13
|
from azure.core.exceptions import (
|
13
14
|
ClientAuthenticationError,
|
14
15
|
HttpResponseError,
|
@@ -25,6 +26,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
|
|
25
26
|
from azure.core.utils import case_insensitive_dict
|
26
27
|
|
27
28
|
from ... import models as _models
|
29
|
+
from ..._serialization import Deserializer, Serializer
|
28
30
|
from ...operations._container_operations import (
|
29
31
|
build_acquire_lease_request,
|
30
32
|
build_break_lease_request,
|
@@ -45,11 +47,12 @@ from ...operations._container_operations import (
|
|
45
47
|
build_set_metadata_request,
|
46
48
|
build_submit_batch_request,
|
47
49
|
)
|
50
|
+
from .._configuration import AzureBlobStorageConfiguration
|
48
51
|
|
49
52
|
if sys.version_info >= (3, 9):
|
50
53
|
from collections.abc import MutableMapping
|
51
54
|
else:
|
52
|
-
from typing import MutableMapping # type: ignore
|
55
|
+
from typing import MutableMapping # type: ignore
|
53
56
|
T = TypeVar("T")
|
54
57
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
|
55
58
|
|
@@ -68,13 +71,13 @@ class ContainerOperations:
|
|
68
71
|
|
69
72
|
def __init__(self, *args, **kwargs) -> None:
|
70
73
|
input_args = list(args)
|
71
|
-
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
|
72
|
-
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
|
73
|
-
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
74
|
-
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
74
|
+
self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
75
|
+
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
76
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
77
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
75
78
|
|
76
79
|
@distributed_trace_async
|
77
|
-
async def create(
|
80
|
+
async def create(
|
78
81
|
self,
|
79
82
|
timeout: Optional[int] = None,
|
80
83
|
metadata: Optional[Dict[str, str]] = None,
|
@@ -113,7 +116,7 @@ class ContainerOperations:
|
|
113
116
|
:rtype: None
|
114
117
|
:raises ~azure.core.exceptions.HttpResponseError:
|
115
118
|
"""
|
116
|
-
error_map: MutableMapping
|
119
|
+
error_map: MutableMapping = {
|
117
120
|
401: ClientAuthenticationError,
|
118
121
|
404: ResourceNotFoundError,
|
119
122
|
409: ResourceExistsError,
|
@@ -174,7 +177,7 @@ class ContainerOperations:
|
|
174
177
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
175
178
|
|
176
179
|
@distributed_trace_async
|
177
|
-
async def get_properties(
|
180
|
+
async def get_properties(
|
178
181
|
self,
|
179
182
|
timeout: Optional[int] = None,
|
180
183
|
request_id_parameter: Optional[str] = None,
|
@@ -200,7 +203,7 @@ class ContainerOperations:
|
|
200
203
|
:rtype: None
|
201
204
|
:raises ~azure.core.exceptions.HttpResponseError:
|
202
205
|
"""
|
203
|
-
error_map: MutableMapping
|
206
|
+
error_map: MutableMapping = {
|
204
207
|
401: ClientAuthenticationError,
|
205
208
|
404: ResourceNotFoundError,
|
206
209
|
409: ResourceExistsError,
|
@@ -276,7 +279,7 @@ class ContainerOperations:
|
|
276
279
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
277
280
|
|
278
281
|
@distributed_trace_async
|
279
|
-
async def delete(
|
282
|
+
async def delete(
|
280
283
|
self,
|
281
284
|
timeout: Optional[int] = None,
|
282
285
|
request_id_parameter: Optional[str] = None,
|
@@ -305,7 +308,7 @@ class ContainerOperations:
|
|
305
308
|
:rtype: None
|
306
309
|
:raises ~azure.core.exceptions.HttpResponseError:
|
307
310
|
"""
|
308
|
-
error_map: MutableMapping
|
311
|
+
error_map: MutableMapping = {
|
309
312
|
401: ClientAuthenticationError,
|
310
313
|
404: ResourceNotFoundError,
|
311
314
|
409: ResourceExistsError,
|
@@ -366,7 +369,7 @@ class ContainerOperations:
|
|
366
369
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
367
370
|
|
368
371
|
@distributed_trace_async
|
369
|
-
async def set_metadata(
|
372
|
+
async def set_metadata(
|
370
373
|
self,
|
371
374
|
timeout: Optional[int] = None,
|
372
375
|
metadata: Optional[Dict[str, str]] = None,
|
@@ -403,7 +406,7 @@ class ContainerOperations:
|
|
403
406
|
:rtype: None
|
404
407
|
:raises ~azure.core.exceptions.HttpResponseError:
|
405
408
|
"""
|
406
|
-
error_map: MutableMapping
|
409
|
+
error_map: MutableMapping = {
|
407
410
|
401: ClientAuthenticationError,
|
408
411
|
404: ResourceNotFoundError,
|
409
412
|
409: ResourceExistsError,
|
@@ -492,7 +495,7 @@ class ContainerOperations:
|
|
492
495
|
:rtype: list[~azure.storage.blob.models.SignedIdentifier]
|
493
496
|
:raises ~azure.core.exceptions.HttpResponseError:
|
494
497
|
"""
|
495
|
-
error_map: MutableMapping
|
498
|
+
error_map: MutableMapping = {
|
496
499
|
401: ClientAuthenticationError,
|
497
500
|
404: ResourceNotFoundError,
|
498
501
|
409: ResourceExistsError,
|
@@ -557,7 +560,7 @@ class ContainerOperations:
|
|
557
560
|
return deserialized # type: ignore
|
558
561
|
|
559
562
|
@distributed_trace_async
|
560
|
-
async def set_access_policy(
|
563
|
+
async def set_access_policy(
|
561
564
|
self,
|
562
565
|
timeout: Optional[int] = None,
|
563
566
|
access: Optional[Union[str, _models.PublicAccessType]] = None,
|
@@ -593,7 +596,7 @@ class ContainerOperations:
|
|
593
596
|
:rtype: None
|
594
597
|
:raises ~azure.core.exceptions.HttpResponseError:
|
595
598
|
"""
|
596
|
-
error_map: MutableMapping
|
599
|
+
error_map: MutableMapping = {
|
597
600
|
401: ClientAuthenticationError,
|
598
601
|
404: ResourceNotFoundError,
|
599
602
|
409: ResourceExistsError,
|
@@ -669,7 +672,7 @@ class ContainerOperations:
|
|
669
672
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
670
673
|
|
671
674
|
@distributed_trace_async
|
672
|
-
async def restore(
|
675
|
+
async def restore(
|
673
676
|
self,
|
674
677
|
timeout: Optional[int] = None,
|
675
678
|
request_id_parameter: Optional[str] = None,
|
@@ -699,7 +702,7 @@ class ContainerOperations:
|
|
699
702
|
:rtype: None
|
700
703
|
:raises ~azure.core.exceptions.HttpResponseError:
|
701
704
|
"""
|
702
|
-
error_map: MutableMapping
|
705
|
+
error_map: MutableMapping = {
|
703
706
|
401: ClientAuthenticationError,
|
704
707
|
404: ResourceNotFoundError,
|
705
708
|
409: ResourceExistsError,
|
@@ -752,7 +755,7 @@ class ContainerOperations:
|
|
752
755
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
753
756
|
|
754
757
|
@distributed_trace_async
|
755
|
-
async def rename(
|
758
|
+
async def rename(
|
756
759
|
self,
|
757
760
|
source_container_name: str,
|
758
761
|
timeout: Optional[int] = None,
|
@@ -782,7 +785,7 @@ class ContainerOperations:
|
|
782
785
|
:rtype: None
|
783
786
|
:raises ~azure.core.exceptions.HttpResponseError:
|
784
787
|
"""
|
785
|
-
error_map: MutableMapping
|
788
|
+
error_map: MutableMapping = {
|
786
789
|
401: ClientAuthenticationError,
|
787
790
|
404: ResourceNotFoundError,
|
788
791
|
409: ResourceExistsError,
|
@@ -863,7 +866,7 @@ class ContainerOperations:
|
|
863
866
|
:rtype: AsyncIterator[bytes]
|
864
867
|
:raises ~azure.core.exceptions.HttpResponseError:
|
865
868
|
"""
|
866
|
-
error_map: MutableMapping
|
869
|
+
error_map: MutableMapping = {
|
867
870
|
401: ClientAuthenticationError,
|
868
871
|
404: ResourceNotFoundError,
|
869
872
|
409: ResourceExistsError,
|
@@ -975,7 +978,7 @@ class ContainerOperations:
|
|
975
978
|
:rtype: ~azure.storage.blob.models.FilterBlobSegment
|
976
979
|
:raises ~azure.core.exceptions.HttpResponseError:
|
977
980
|
"""
|
978
|
-
error_map: MutableMapping
|
981
|
+
error_map: MutableMapping = {
|
979
982
|
401: ClientAuthenticationError,
|
980
983
|
404: ResourceNotFoundError,
|
981
984
|
409: ResourceExistsError,
|
@@ -1034,7 +1037,7 @@ class ContainerOperations:
|
|
1034
1037
|
return deserialized # type: ignore
|
1035
1038
|
|
1036
1039
|
@distributed_trace_async
|
1037
|
-
async def acquire_lease(
|
1040
|
+
async def acquire_lease(
|
1038
1041
|
self,
|
1039
1042
|
timeout: Optional[int] = None,
|
1040
1043
|
duration: Optional[int] = None,
|
@@ -1070,7 +1073,7 @@ class ContainerOperations:
|
|
1070
1073
|
:rtype: None
|
1071
1074
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1072
1075
|
"""
|
1073
|
-
error_map: MutableMapping
|
1076
|
+
error_map: MutableMapping = {
|
1074
1077
|
401: ClientAuthenticationError,
|
1075
1078
|
404: ResourceNotFoundError,
|
1076
1079
|
409: ResourceExistsError,
|
@@ -1136,7 +1139,7 @@ class ContainerOperations:
|
|
1136
1139
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
1137
1140
|
|
1138
1141
|
@distributed_trace_async
|
1139
|
-
async def release_lease(
|
1142
|
+
async def release_lease(
|
1140
1143
|
self,
|
1141
1144
|
lease_id: str,
|
1142
1145
|
timeout: Optional[int] = None,
|
@@ -1165,7 +1168,7 @@ class ContainerOperations:
|
|
1165
1168
|
:rtype: None
|
1166
1169
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1167
1170
|
"""
|
1168
|
-
error_map: MutableMapping
|
1171
|
+
error_map: MutableMapping = {
|
1169
1172
|
401: ClientAuthenticationError,
|
1170
1173
|
404: ResourceNotFoundError,
|
1171
1174
|
409: ResourceExistsError,
|
@@ -1229,7 +1232,7 @@ class ContainerOperations:
|
|
1229
1232
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
1230
1233
|
|
1231
1234
|
@distributed_trace_async
|
1232
|
-
async def renew_lease(
|
1235
|
+
async def renew_lease(
|
1233
1236
|
self,
|
1234
1237
|
lease_id: str,
|
1235
1238
|
timeout: Optional[int] = None,
|
@@ -1258,7 +1261,7 @@ class ContainerOperations:
|
|
1258
1261
|
:rtype: None
|
1259
1262
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1260
1263
|
"""
|
1261
|
-
error_map: MutableMapping
|
1264
|
+
error_map: MutableMapping = {
|
1262
1265
|
401: ClientAuthenticationError,
|
1263
1266
|
404: ResourceNotFoundError,
|
1264
1267
|
409: ResourceExistsError,
|
@@ -1323,7 +1326,7 @@ class ContainerOperations:
|
|
1323
1326
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
1324
1327
|
|
1325
1328
|
@distributed_trace_async
|
1326
|
-
async def break_lease(
|
1329
|
+
async def break_lease(
|
1327
1330
|
self,
|
1328
1331
|
timeout: Optional[int] = None,
|
1329
1332
|
break_period: Optional[int] = None,
|
@@ -1358,7 +1361,7 @@ class ContainerOperations:
|
|
1358
1361
|
:rtype: None
|
1359
1362
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1360
1363
|
"""
|
1361
|
-
error_map: MutableMapping
|
1364
|
+
error_map: MutableMapping = {
|
1362
1365
|
401: ClientAuthenticationError,
|
1363
1366
|
404: ResourceNotFoundError,
|
1364
1367
|
409: ResourceExistsError,
|
@@ -1423,7 +1426,7 @@ class ContainerOperations:
|
|
1423
1426
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
1424
1427
|
|
1425
1428
|
@distributed_trace_async
|
1426
|
-
async def change_lease(
|
1429
|
+
async def change_lease(
|
1427
1430
|
self,
|
1428
1431
|
lease_id: str,
|
1429
1432
|
proposed_lease_id: str,
|
@@ -1457,7 +1460,7 @@ class ContainerOperations:
|
|
1457
1460
|
:rtype: None
|
1458
1461
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1459
1462
|
"""
|
1460
|
-
error_map: MutableMapping
|
1463
|
+
error_map: MutableMapping = {
|
1461
1464
|
401: ClientAuthenticationError,
|
1462
1465
|
404: ResourceNotFoundError,
|
1463
1466
|
409: ResourceExistsError,
|
@@ -1569,7 +1572,7 @@ class ContainerOperations:
|
|
1569
1572
|
:rtype: ~azure.storage.blob.models.ListBlobsFlatSegmentResponse
|
1570
1573
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1571
1574
|
"""
|
1572
|
-
error_map: MutableMapping
|
1575
|
+
error_map: MutableMapping = {
|
1573
1576
|
401: ClientAuthenticationError,
|
1574
1577
|
404: ResourceNotFoundError,
|
1575
1578
|
409: ResourceExistsError,
|
@@ -1681,7 +1684,7 @@ class ContainerOperations:
|
|
1681
1684
|
:rtype: ~azure.storage.blob.models.ListBlobsHierarchySegmentResponse
|
1682
1685
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1683
1686
|
"""
|
1684
|
-
error_map: MutableMapping
|
1687
|
+
error_map: MutableMapping = {
|
1685
1688
|
401: ClientAuthenticationError,
|
1686
1689
|
404: ResourceNotFoundError,
|
1687
1690
|
409: ResourceExistsError,
|
@@ -1742,7 +1745,7 @@ class ContainerOperations:
|
|
1742
1745
|
return deserialized # type: ignore
|
1743
1746
|
|
1744
1747
|
@distributed_trace_async
|
1745
|
-
async def get_account_info(
|
1748
|
+
async def get_account_info(
|
1746
1749
|
self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
|
1747
1750
|
) -> None:
|
1748
1751
|
# pylint: disable=line-too-long
|
@@ -1761,7 +1764,7 @@ class ContainerOperations:
|
|
1761
1764
|
:rtype: None
|
1762
1765
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1763
1766
|
"""
|
1764
|
-
error_map: MutableMapping
|
1767
|
+
error_map: MutableMapping = {
|
1765
1768
|
401: ClientAuthenticationError,
|
1766
1769
|
404: ResourceNotFoundError,
|
1767
1770
|
409: ResourceExistsError,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -8,8 +8,9 @@
|
|
8
8
|
# --------------------------------------------------------------------------
|
9
9
|
import datetime
|
10
10
|
import sys
|
11
|
-
from typing import Any, Callable, Dict, IO, Literal, Optional,
|
11
|
+
from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
|
12
12
|
|
13
|
+
from azure.core import AsyncPipelineClient
|
13
14
|
from azure.core.exceptions import (
|
14
15
|
ClientAuthenticationError,
|
15
16
|
HttpResponseError,
|
@@ -24,6 +25,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
|
|
24
25
|
from azure.core.utils import case_insensitive_dict
|
25
26
|
|
26
27
|
from ... import models as _models
|
28
|
+
from ..._serialization import Deserializer, Serializer
|
27
29
|
from ...operations._page_blob_operations import (
|
28
30
|
build_clear_pages_request,
|
29
31
|
build_copy_incremental_request,
|
@@ -35,11 +37,12 @@ from ...operations._page_blob_operations import (
|
|
35
37
|
build_upload_pages_from_url_request,
|
36
38
|
build_upload_pages_request,
|
37
39
|
)
|
40
|
+
from .._configuration import AzureBlobStorageConfiguration
|
38
41
|
|
39
42
|
if sys.version_info >= (3, 9):
|
40
43
|
from collections.abc import MutableMapping
|
41
44
|
else:
|
42
|
-
from typing import MutableMapping # type: ignore
|
45
|
+
from typing import MutableMapping # type: ignore
|
43
46
|
T = TypeVar("T")
|
44
47
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
|
45
48
|
|
@@ -58,13 +61,13 @@ class PageBlobOperations:
|
|
58
61
|
|
59
62
|
def __init__(self, *args, **kwargs) -> None:
|
60
63
|
input_args = list(args)
|
61
|
-
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
|
62
|
-
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
|
63
|
-
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
64
|
-
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
64
|
+
self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
|
65
|
+
self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
|
66
|
+
self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
|
67
|
+
self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
|
65
68
|
|
66
69
|
@distributed_trace_async
|
67
|
-
async def create(
|
70
|
+
async def create(
|
68
71
|
self,
|
69
72
|
content_length: int,
|
70
73
|
blob_content_length: int,
|
@@ -141,7 +144,7 @@ class PageBlobOperations:
|
|
141
144
|
:rtype: None
|
142
145
|
:raises ~azure.core.exceptions.HttpResponseError:
|
143
146
|
"""
|
144
|
-
error_map: MutableMapping
|
147
|
+
error_map: MutableMapping = {
|
145
148
|
401: ClientAuthenticationError,
|
146
149
|
404: ResourceNotFoundError,
|
147
150
|
409: ResourceExistsError,
|
@@ -266,7 +269,7 @@ class PageBlobOperations:
|
|
266
269
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
267
270
|
|
268
271
|
@distributed_trace_async
|
269
|
-
async def upload_pages(
|
272
|
+
async def upload_pages(
|
270
273
|
self,
|
271
274
|
content_length: int,
|
272
275
|
body: IO[bytes],
|
@@ -330,7 +333,7 @@ class PageBlobOperations:
|
|
330
333
|
:rtype: None
|
331
334
|
:raises ~azure.core.exceptions.HttpResponseError:
|
332
335
|
"""
|
333
|
-
error_map: MutableMapping
|
336
|
+
error_map: MutableMapping = {
|
334
337
|
401: ClientAuthenticationError,
|
335
338
|
404: ResourceNotFoundError,
|
336
339
|
409: ResourceExistsError,
|
@@ -459,7 +462,7 @@ class PageBlobOperations:
|
|
459
462
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
460
463
|
|
461
464
|
@distributed_trace_async
|
462
|
-
async def clear_pages(
|
465
|
+
async def clear_pages(
|
463
466
|
self,
|
464
467
|
content_length: int,
|
465
468
|
timeout: Optional[int] = None,
|
@@ -503,7 +506,7 @@ class PageBlobOperations:
|
|
503
506
|
:rtype: None
|
504
507
|
:raises ~azure.core.exceptions.HttpResponseError:
|
505
508
|
"""
|
506
|
-
error_map: MutableMapping
|
509
|
+
error_map: MutableMapping = {
|
507
510
|
401: ClientAuthenticationError,
|
508
511
|
404: ResourceNotFoundError,
|
509
512
|
409: ResourceExistsError,
|
@@ -612,7 +615,7 @@ class PageBlobOperations:
|
|
612
615
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
613
616
|
|
614
617
|
@distributed_trace_async
|
615
|
-
async def upload_pages_from_url(
|
618
|
+
async def upload_pages_from_url(
|
616
619
|
self,
|
617
620
|
source_url: str,
|
618
621
|
source_range: str,
|
@@ -681,7 +684,7 @@ class PageBlobOperations:
|
|
681
684
|
:rtype: None
|
682
685
|
:raises ~azure.core.exceptions.HttpResponseError:
|
683
686
|
"""
|
684
|
-
error_map: MutableMapping
|
687
|
+
error_map: MutableMapping = {
|
685
688
|
401: ClientAuthenticationError,
|
686
689
|
404: ResourceNotFoundError,
|
687
690
|
409: ResourceExistsError,
|
@@ -869,7 +872,7 @@ class PageBlobOperations:
|
|
869
872
|
:rtype: ~azure.storage.blob.models.PageList
|
870
873
|
:raises ~azure.core.exceptions.HttpResponseError:
|
871
874
|
"""
|
872
|
-
error_map: MutableMapping
|
875
|
+
error_map: MutableMapping = {
|
873
876
|
401: ClientAuthenticationError,
|
874
877
|
404: ResourceNotFoundError,
|
875
878
|
409: ResourceExistsError,
|
@@ -1021,7 +1024,7 @@ class PageBlobOperations:
|
|
1021
1024
|
:rtype: ~azure.storage.blob.models.PageList
|
1022
1025
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1023
1026
|
"""
|
1024
|
-
error_map: MutableMapping
|
1027
|
+
error_map: MutableMapping = {
|
1025
1028
|
401: ClientAuthenticationError,
|
1026
1029
|
404: ResourceNotFoundError,
|
1027
1030
|
409: ResourceExistsError,
|
@@ -1106,7 +1109,7 @@ class PageBlobOperations:
|
|
1106
1109
|
return deserialized # type: ignore
|
1107
1110
|
|
1108
1111
|
@distributed_trace_async
|
1109
|
-
async def resize(
|
1112
|
+
async def resize(
|
1110
1113
|
self,
|
1111
1114
|
blob_content_length: int,
|
1112
1115
|
timeout: Optional[int] = None,
|
@@ -1144,7 +1147,7 @@ class PageBlobOperations:
|
|
1144
1147
|
:rtype: None
|
1145
1148
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1146
1149
|
"""
|
1147
|
-
error_map: MutableMapping
|
1150
|
+
error_map: MutableMapping = {
|
1148
1151
|
401: ClientAuthenticationError,
|
1149
1152
|
404: ResourceNotFoundError,
|
1150
1153
|
409: ResourceExistsError,
|
@@ -1234,7 +1237,7 @@ class PageBlobOperations:
|
|
1234
1237
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
1235
1238
|
|
1236
1239
|
@distributed_trace_async
|
1237
|
-
async def update_sequence_number(
|
1240
|
+
async def update_sequence_number(
|
1238
1241
|
self,
|
1239
1242
|
sequence_number_action: Union[str, _models.SequenceNumberActionType],
|
1240
1243
|
timeout: Optional[int] = None,
|
@@ -1273,7 +1276,7 @@ class PageBlobOperations:
|
|
1273
1276
|
:rtype: None
|
1274
1277
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1275
1278
|
"""
|
1276
|
-
error_map: MutableMapping
|
1279
|
+
error_map: MutableMapping = {
|
1277
1280
|
401: ClientAuthenticationError,
|
1278
1281
|
404: ResourceNotFoundError,
|
1279
1282
|
409: ResourceExistsError,
|
@@ -1350,7 +1353,7 @@ class PageBlobOperations:
|
|
1350
1353
|
return cls(pipeline_response, None, response_headers) # type: ignore
|
1351
1354
|
|
1352
1355
|
@distributed_trace_async
|
1353
|
-
async def copy_incremental(
|
1356
|
+
async def copy_incremental(
|
1354
1357
|
self,
|
1355
1358
|
copy_source: str,
|
1356
1359
|
timeout: Optional[int] = None,
|
@@ -1385,7 +1388,7 @@ class PageBlobOperations:
|
|
1385
1388
|
:rtype: None
|
1386
1389
|
:raises ~azure.core.exceptions.HttpResponseError:
|
1387
1390
|
"""
|
1388
|
-
error_map: MutableMapping
|
1391
|
+
error_map: MutableMapping = {
|
1389
1392
|
401: ClientAuthenticationError,
|
1390
1393
|
404: ResourceNotFoundError,
|
1391
1394
|
409: ResourceExistsError,
|
@@ -2,19 +2,13 @@
|
|
2
2
|
# Copyright (c) Microsoft Corporation.
|
3
3
|
# Licensed under the MIT License.
|
4
4
|
# ------------------------------------
|
5
|
-
|
6
|
-
|
7
5
|
"""Customize generated code here.
|
8
6
|
|
9
7
|
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
10
8
|
"""
|
11
|
-
from typing import
|
12
|
-
|
13
|
-
if TYPE_CHECKING:
|
14
|
-
# pylint: disable=unused-import,ungrouped-imports
|
9
|
+
from typing import List
|
15
10
|
|
16
|
-
|
17
|
-
__all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level
|
11
|
+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
18
12
|
|
19
13
|
|
20
14
|
def patch_sdk():
|