azure-storage-blob 12.19.0b1__py3-none-any.whl → 12.20.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azure/storage/blob/__init__.py +17 -5
- azure/storage/blob/_blob_client.py +26 -6
- azure/storage/blob/_blob_service_client.py +11 -4
- azure/storage/blob/_container_client.py +45 -17
- azure/storage/blob/_download.py +5 -4
- azure/storage/blob/_encryption.py +254 -165
- azure/storage/blob/_generated/_azure_blob_storage.py +21 -3
- azure/storage/blob/_generated/_configuration.py +4 -11
- azure/storage/blob/_generated/_serialization.py +41 -49
- azure/storage/blob/_generated/aio/_azure_blob_storage.py +23 -3
- azure/storage/blob/_generated/aio/_configuration.py +4 -11
- azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +24 -58
- azure/storage/blob/_generated/aio/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +37 -86
- azure/storage/blob/_generated/aio/operations/_container_operations.py +98 -289
- azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +51 -150
- azure/storage/blob/_generated/aio/operations/_service_operations.py +49 -125
- azure/storage/blob/_generated/models/_models_py3.py +31 -31
- azure/storage/blob/_generated/operations/_append_blob_operations.py +25 -59
- azure/storage/blob/_generated/operations/_blob_operations.py +123 -306
- azure/storage/blob/_generated/operations/_block_blob_operations.py +39 -88
- azure/storage/blob/_generated/operations/_container_operations.py +100 -291
- azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -151
- azure/storage/blob/_generated/operations/_service_operations.py +50 -126
- azure/storage/blob/_lease.py +1 -0
- azure/storage/blob/_models.py +3 -4
- azure/storage/blob/_serialize.py +1 -0
- azure/storage/blob/_shared/authentication.py +1 -1
- azure/storage/blob/_shared/avro/avro_io.py +0 -6
- azure/storage/blob/_shared/avro/avro_io_async.py +0 -6
- azure/storage/blob/_shared/avro/datafile.py +0 -4
- azure/storage/blob/_shared/avro/datafile_async.py +0 -4
- azure/storage/blob/_shared/avro/schema.py +4 -4
- azure/storage/blob/_shared/base_client.py +72 -87
- azure/storage/blob/_shared/base_client_async.py +115 -27
- azure/storage/blob/_shared/models.py +120 -27
- azure/storage/blob/_shared/parser.py +7 -6
- azure/storage/blob/_shared/policies.py +96 -66
- azure/storage/blob/_shared/policies_async.py +48 -21
- azure/storage/blob/_shared/response_handlers.py +14 -16
- azure/storage/blob/_shared/shared_access_signature.py +3 -3
- azure/storage/blob/_shared_access_signature.py +48 -33
- azure/storage/blob/_upload_helpers.py +4 -7
- azure/storage/blob/_version.py +1 -1
- azure/storage/blob/aio/__init__.py +13 -4
- azure/storage/blob/aio/_blob_client_async.py +17 -6
- azure/storage/blob/aio/_blob_service_client_async.py +6 -3
- azure/storage/blob/aio/_container_client_async.py +34 -13
- azure/storage/blob/aio/_download_async.py +11 -10
- azure/storage/blob/aio/_encryption_async.py +72 -0
- azure/storage/blob/aio/_lease_async.py +1 -1
- azure/storage/blob/aio/_upload_helpers.py +8 -10
- {azure_storage_blob-12.19.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/METADATA +11 -11
- azure_storage_blob-12.20.0.dist-info/RECORD +81 -0
- {azure_storage_blob-12.19.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/WHEEL +1 -1
- azure_storage_blob-12.19.0b1.dist-info/RECORD +0 -80
- {azure_storage_blob-12.19.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/LICENSE +0 -0
- {azure_storage_blob-12.19.0b1.dist-info → azure_storage_blob-12.20.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
1
|
+
# pylint: disable=too-many-lines,too-many-statements
|
2
2
|
# coding=utf-8
|
3
3
|
# --------------------------------------------------------------------------
|
4
4
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
@@ -6,8 +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
|
10
|
-
from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union
|
9
|
+
from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union
|
11
10
|
|
12
11
|
from azure.core.exceptions import (
|
13
12
|
ClientAuthenticationError,
|
@@ -46,10 +45,6 @@ from ...operations._container_operations import (
|
|
46
45
|
build_submit_batch_request,
|
47
46
|
)
|
48
47
|
|
49
|
-
if sys.version_info >= (3, 8):
|
50
|
-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
|
51
|
-
else:
|
52
|
-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
|
53
48
|
T = TypeVar("T")
|
54
49
|
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
|
55
50
|
|
@@ -108,10 +103,6 @@ class ContainerOperations:
|
|
108
103
|
:type request_id_parameter: str
|
109
104
|
:param container_cpk_scope_info: Parameter group. Default value is None.
|
110
105
|
:type container_cpk_scope_info: ~azure.storage.blob.models.ContainerCpkScopeInfo
|
111
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
112
|
-
value may result in unsupported behavior.
|
113
|
-
:paramtype restype: str
|
114
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
115
106
|
:return: None or the result of cls(response)
|
116
107
|
:rtype: None
|
117
108
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -136,7 +127,7 @@ class ContainerOperations:
|
|
136
127
|
_default_encryption_scope = container_cpk_scope_info.default_encryption_scope
|
137
128
|
_prevent_encryption_scope_override = container_cpk_scope_info.prevent_encryption_scope_override
|
138
129
|
|
139
|
-
|
130
|
+
_request = build_create_request(
|
140
131
|
url=self._config.url,
|
141
132
|
timeout=timeout,
|
142
133
|
metadata=metadata,
|
@@ -146,16 +137,15 @@ class ContainerOperations:
|
|
146
137
|
prevent_encryption_scope_override=_prevent_encryption_scope_override,
|
147
138
|
restype=restype,
|
148
139
|
version=self._config.version,
|
149
|
-
template_url=self.create.metadata["url"],
|
150
140
|
headers=_headers,
|
151
141
|
params=_params,
|
152
142
|
)
|
153
|
-
|
154
|
-
|
143
|
+
_request = _convert_request(_request)
|
144
|
+
_request.url = self._client.format_url(_request.url)
|
155
145
|
|
156
146
|
_stream = False
|
157
147
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
158
|
-
|
148
|
+
_request, stream=_stream, **kwargs
|
159
149
|
)
|
160
150
|
|
161
151
|
response = pipeline_response.http_response
|
@@ -176,9 +166,7 @@ class ContainerOperations:
|
|
176
166
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
177
167
|
|
178
168
|
if cls:
|
179
|
-
return cls(pipeline_response, None, response_headers)
|
180
|
-
|
181
|
-
create.metadata = {"url": "{url}"}
|
169
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
182
170
|
|
183
171
|
@distributed_trace_async
|
184
172
|
async def get_properties( # pylint: disable=inconsistent-return-statements
|
@@ -202,10 +190,6 @@ class ContainerOperations:
|
|
202
190
|
:type request_id_parameter: str
|
203
191
|
:param lease_access_conditions: Parameter group. Default value is None.
|
204
192
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
205
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
206
|
-
value may result in unsupported behavior.
|
207
|
-
:paramtype restype: str
|
208
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
209
193
|
:return: None or the result of cls(response)
|
210
194
|
:rtype: None
|
211
195
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -228,23 +212,22 @@ class ContainerOperations:
|
|
228
212
|
if lease_access_conditions is not None:
|
229
213
|
_lease_id = lease_access_conditions.lease_id
|
230
214
|
|
231
|
-
|
215
|
+
_request = build_get_properties_request(
|
232
216
|
url=self._config.url,
|
233
217
|
timeout=timeout,
|
234
218
|
lease_id=_lease_id,
|
235
219
|
request_id_parameter=request_id_parameter,
|
236
220
|
restype=restype,
|
237
221
|
version=self._config.version,
|
238
|
-
template_url=self.get_properties.metadata["url"],
|
239
222
|
headers=_headers,
|
240
223
|
params=_params,
|
241
224
|
)
|
242
|
-
|
243
|
-
|
225
|
+
_request = _convert_request(_request)
|
226
|
+
_request.url = self._client.format_url(_request.url)
|
244
227
|
|
245
228
|
_stream = False
|
246
229
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
247
|
-
|
230
|
+
_request, stream=_stream, **kwargs
|
248
231
|
)
|
249
232
|
|
250
233
|
response = pipeline_response.http_response
|
@@ -285,9 +268,7 @@ class ContainerOperations:
|
|
285
268
|
)
|
286
269
|
|
287
270
|
if cls:
|
288
|
-
return cls(pipeline_response, None, response_headers)
|
289
|
-
|
290
|
-
get_properties.metadata = {"url": "{url}"}
|
271
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
291
272
|
|
292
273
|
@distributed_trace_async
|
293
274
|
async def delete( # pylint: disable=inconsistent-return-statements
|
@@ -314,10 +295,6 @@ class ContainerOperations:
|
|
314
295
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
315
296
|
:param modified_access_conditions: Parameter group. Default value is None.
|
316
297
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
317
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
318
|
-
value may result in unsupported behavior.
|
319
|
-
:paramtype restype: str
|
320
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
321
298
|
:return: None or the result of cls(response)
|
322
299
|
:rtype: None
|
323
300
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -345,7 +322,7 @@ class ContainerOperations:
|
|
345
322
|
_if_modified_since = modified_access_conditions.if_modified_since
|
346
323
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
347
324
|
|
348
|
-
|
325
|
+
_request = build_delete_request(
|
349
326
|
url=self._config.url,
|
350
327
|
timeout=timeout,
|
351
328
|
lease_id=_lease_id,
|
@@ -354,16 +331,15 @@ class ContainerOperations:
|
|
354
331
|
request_id_parameter=request_id_parameter,
|
355
332
|
restype=restype,
|
356
333
|
version=self._config.version,
|
357
|
-
template_url=self.delete.metadata["url"],
|
358
334
|
headers=_headers,
|
359
335
|
params=_params,
|
360
336
|
)
|
361
|
-
|
362
|
-
|
337
|
+
_request = _convert_request(_request)
|
338
|
+
_request.url = self._client.format_url(_request.url)
|
363
339
|
|
364
340
|
_stream = False
|
365
341
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
366
|
-
|
342
|
+
_request, stream=_stream, **kwargs
|
367
343
|
)
|
368
344
|
|
369
345
|
response = pipeline_response.http_response
|
@@ -382,9 +358,7 @@ class ContainerOperations:
|
|
382
358
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
383
359
|
|
384
360
|
if cls:
|
385
|
-
return cls(pipeline_response, None, response_headers)
|
386
|
-
|
387
|
-
delete.metadata = {"url": "{url}"}
|
361
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
388
362
|
|
389
363
|
@distributed_trace_async
|
390
364
|
async def set_metadata( # pylint: disable=inconsistent-return-statements
|
@@ -419,13 +393,6 @@ class ContainerOperations:
|
|
419
393
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
420
394
|
:param modified_access_conditions: Parameter group. Default value is None.
|
421
395
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
422
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
423
|
-
value may result in unsupported behavior.
|
424
|
-
:paramtype restype: str
|
425
|
-
:keyword comp: comp. Default value is "metadata". Note that overriding this default value may
|
426
|
-
result in unsupported behavior.
|
427
|
-
:paramtype comp: str
|
428
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
429
396
|
:return: None or the result of cls(response)
|
430
397
|
:rtype: None
|
431
398
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -452,7 +419,7 @@ class ContainerOperations:
|
|
452
419
|
if modified_access_conditions is not None:
|
453
420
|
_if_modified_since = modified_access_conditions.if_modified_since
|
454
421
|
|
455
|
-
|
422
|
+
_request = build_set_metadata_request(
|
456
423
|
url=self._config.url,
|
457
424
|
timeout=timeout,
|
458
425
|
lease_id=_lease_id,
|
@@ -462,16 +429,15 @@ class ContainerOperations:
|
|
462
429
|
restype=restype,
|
463
430
|
comp=comp,
|
464
431
|
version=self._config.version,
|
465
|
-
template_url=self.set_metadata.metadata["url"],
|
466
432
|
headers=_headers,
|
467
433
|
params=_params,
|
468
434
|
)
|
469
|
-
|
470
|
-
|
435
|
+
_request = _convert_request(_request)
|
436
|
+
_request.url = self._client.format_url(_request.url)
|
471
437
|
|
472
438
|
_stream = False
|
473
439
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
474
|
-
|
440
|
+
_request, stream=_stream, **kwargs
|
475
441
|
)
|
476
442
|
|
477
443
|
response = pipeline_response.http_response
|
@@ -492,9 +458,7 @@ class ContainerOperations:
|
|
492
458
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
493
459
|
|
494
460
|
if cls:
|
495
|
-
return cls(pipeline_response, None, response_headers)
|
496
|
-
|
497
|
-
set_metadata.metadata = {"url": "{url}"}
|
461
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
498
462
|
|
499
463
|
@distributed_trace_async
|
500
464
|
async def get_access_policy(
|
@@ -518,13 +482,6 @@ class ContainerOperations:
|
|
518
482
|
:type request_id_parameter: str
|
519
483
|
:param lease_access_conditions: Parameter group. Default value is None.
|
520
484
|
:type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions
|
521
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
522
|
-
value may result in unsupported behavior.
|
523
|
-
:paramtype restype: str
|
524
|
-
:keyword comp: comp. Default value is "acl". Note that overriding this default value may result
|
525
|
-
in unsupported behavior.
|
526
|
-
:paramtype comp: str
|
527
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
528
485
|
:return: list of SignedIdentifier or the result of cls(response)
|
529
486
|
:rtype: list[~azure.storage.blob.models.SignedIdentifier]
|
530
487
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -548,7 +505,7 @@ class ContainerOperations:
|
|
548
505
|
if lease_access_conditions is not None:
|
549
506
|
_lease_id = lease_access_conditions.lease_id
|
550
507
|
|
551
|
-
|
508
|
+
_request = build_get_access_policy_request(
|
552
509
|
url=self._config.url,
|
553
510
|
timeout=timeout,
|
554
511
|
lease_id=_lease_id,
|
@@ -556,16 +513,15 @@ class ContainerOperations:
|
|
556
513
|
restype=restype,
|
557
514
|
comp=comp,
|
558
515
|
version=self._config.version,
|
559
|
-
template_url=self.get_access_policy.metadata["url"],
|
560
516
|
headers=_headers,
|
561
517
|
params=_params,
|
562
518
|
)
|
563
|
-
|
564
|
-
|
519
|
+
_request = _convert_request(_request)
|
520
|
+
_request.url = self._client.format_url(_request.url)
|
565
521
|
|
566
522
|
_stream = False
|
567
523
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
568
|
-
|
524
|
+
_request, stream=_stream, **kwargs
|
569
525
|
)
|
570
526
|
|
571
527
|
response = pipeline_response.http_response
|
@@ -591,11 +547,9 @@ class ContainerOperations:
|
|
591
547
|
deserialized = self._deserialize("[SignedIdentifier]", pipeline_response)
|
592
548
|
|
593
549
|
if cls:
|
594
|
-
return cls(pipeline_response, deserialized, response_headers)
|
595
|
-
|
596
|
-
return deserialized
|
550
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
597
551
|
|
598
|
-
|
552
|
+
return deserialized # type: ignore
|
599
553
|
|
600
554
|
@distributed_trace_async
|
601
555
|
async def set_access_policy( # pylint: disable=inconsistent-return-statements
|
@@ -629,13 +583,6 @@ class ContainerOperations:
|
|
629
583
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
630
584
|
:param container_acl: the acls for the container. Default value is None.
|
631
585
|
:type container_acl: list[~azure.storage.blob.models.SignedIdentifier]
|
632
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
633
|
-
value may result in unsupported behavior.
|
634
|
-
:paramtype restype: str
|
635
|
-
:keyword comp: comp. Default value is "acl". Note that overriding this default value may result
|
636
|
-
in unsupported behavior.
|
637
|
-
:paramtype comp: str
|
638
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
639
586
|
:return: None or the result of cls(response)
|
640
587
|
:rtype: None
|
641
588
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -672,7 +619,7 @@ class ContainerOperations:
|
|
672
619
|
else:
|
673
620
|
_content = None
|
674
621
|
|
675
|
-
|
622
|
+
_request = build_set_access_policy_request(
|
676
623
|
url=self._config.url,
|
677
624
|
timeout=timeout,
|
678
625
|
lease_id=_lease_id,
|
@@ -685,16 +632,15 @@ class ContainerOperations:
|
|
685
632
|
content_type=content_type,
|
686
633
|
version=self._config.version,
|
687
634
|
content=_content,
|
688
|
-
template_url=self.set_access_policy.metadata["url"],
|
689
635
|
headers=_headers,
|
690
636
|
params=_params,
|
691
637
|
)
|
692
|
-
|
693
|
-
|
638
|
+
_request = _convert_request(_request)
|
639
|
+
_request.url = self._client.format_url(_request.url)
|
694
640
|
|
695
641
|
_stream = False
|
696
642
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
697
|
-
|
643
|
+
_request, stream=_stream, **kwargs
|
698
644
|
)
|
699
645
|
|
700
646
|
response = pipeline_response.http_response
|
@@ -715,9 +661,7 @@ class ContainerOperations:
|
|
715
661
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
716
662
|
|
717
663
|
if cls:
|
718
|
-
return cls(pipeline_response, None, response_headers)
|
719
|
-
|
720
|
-
set_access_policy.metadata = {"url": "{url}"}
|
664
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
721
665
|
|
722
666
|
@distributed_trace_async
|
723
667
|
async def restore( # pylint: disable=inconsistent-return-statements
|
@@ -745,13 +689,6 @@ class ContainerOperations:
|
|
745
689
|
:param deleted_container_version: Optional. Version 2019-12-12 and later. Specifies the
|
746
690
|
version of the deleted container to restore. Default value is None.
|
747
691
|
:type deleted_container_version: str
|
748
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
749
|
-
value may result in unsupported behavior.
|
750
|
-
:paramtype restype: str
|
751
|
-
:keyword comp: comp. Default value is "undelete". Note that overriding this default value may
|
752
|
-
result in unsupported behavior.
|
753
|
-
:paramtype comp: str
|
754
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
755
692
|
:return: None or the result of cls(response)
|
756
693
|
:rtype: None
|
757
694
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -771,7 +708,7 @@ class ContainerOperations:
|
|
771
708
|
comp: Literal["undelete"] = kwargs.pop("comp", _params.pop("comp", "undelete"))
|
772
709
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
773
710
|
|
774
|
-
|
711
|
+
_request = build_restore_request(
|
775
712
|
url=self._config.url,
|
776
713
|
timeout=timeout,
|
777
714
|
request_id_parameter=request_id_parameter,
|
@@ -780,16 +717,15 @@ class ContainerOperations:
|
|
780
717
|
restype=restype,
|
781
718
|
comp=comp,
|
782
719
|
version=self._config.version,
|
783
|
-
template_url=self.restore.metadata["url"],
|
784
720
|
headers=_headers,
|
785
721
|
params=_params,
|
786
722
|
)
|
787
|
-
|
788
|
-
|
723
|
+
_request = _convert_request(_request)
|
724
|
+
_request.url = self._client.format_url(_request.url)
|
789
725
|
|
790
726
|
_stream = False
|
791
727
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
792
|
-
|
728
|
+
_request, stream=_stream, **kwargs
|
793
729
|
)
|
794
730
|
|
795
731
|
response = pipeline_response.http_response
|
@@ -808,9 +744,7 @@ class ContainerOperations:
|
|
808
744
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
809
745
|
|
810
746
|
if cls:
|
811
|
-
return cls(pipeline_response, None, response_headers)
|
812
|
-
|
813
|
-
restore.metadata = {"url": "{url}"}
|
747
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
814
748
|
|
815
749
|
@distributed_trace_async
|
816
750
|
async def rename( # pylint: disable=inconsistent-return-statements
|
@@ -838,13 +772,6 @@ class ContainerOperations:
|
|
838
772
|
:param source_lease_id: A lease ID for the source path. If specified, the source path must have
|
839
773
|
an active lease and the lease ID must match. Default value is None.
|
840
774
|
:type source_lease_id: str
|
841
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
842
|
-
value may result in unsupported behavior.
|
843
|
-
:paramtype restype: str
|
844
|
-
:keyword comp: comp. Default value is "rename". Note that overriding this default value may
|
845
|
-
result in unsupported behavior.
|
846
|
-
:paramtype comp: str
|
847
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
848
775
|
:return: None or the result of cls(response)
|
849
776
|
:rtype: None
|
850
777
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -864,7 +791,7 @@ class ContainerOperations:
|
|
864
791
|
comp: Literal["rename"] = kwargs.pop("comp", _params.pop("comp", "rename"))
|
865
792
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
866
793
|
|
867
|
-
|
794
|
+
_request = build_rename_request(
|
868
795
|
url=self._config.url,
|
869
796
|
source_container_name=source_container_name,
|
870
797
|
timeout=timeout,
|
@@ -873,16 +800,15 @@ class ContainerOperations:
|
|
873
800
|
restype=restype,
|
874
801
|
comp=comp,
|
875
802
|
version=self._config.version,
|
876
|
-
template_url=self.rename.metadata["url"],
|
877
803
|
headers=_headers,
|
878
804
|
params=_params,
|
879
805
|
)
|
880
|
-
|
881
|
-
|
806
|
+
_request = _convert_request(_request)
|
807
|
+
_request.url = self._client.format_url(_request.url)
|
882
808
|
|
883
809
|
_stream = False
|
884
810
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
885
|
-
|
811
|
+
_request, stream=_stream, **kwargs
|
886
812
|
)
|
887
813
|
|
888
814
|
response = pipeline_response.http_response
|
@@ -901,15 +827,13 @@ class ContainerOperations:
|
|
901
827
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
902
828
|
|
903
829
|
if cls:
|
904
|
-
return cls(pipeline_response, None, response_headers)
|
905
|
-
|
906
|
-
rename.metadata = {"url": "{url}"}
|
830
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
907
831
|
|
908
832
|
@distributed_trace_async
|
909
833
|
async def submit_batch(
|
910
834
|
self,
|
911
835
|
content_length: int,
|
912
|
-
body: IO,
|
836
|
+
body: IO[bytes],
|
913
837
|
timeout: Optional[int] = None,
|
914
838
|
request_id_parameter: Optional[str] = None,
|
915
839
|
**kwargs: Any
|
@@ -919,7 +843,7 @@ class ContainerOperations:
|
|
919
843
|
:param content_length: The length of the request. Required.
|
920
844
|
:type content_length: int
|
921
845
|
:param body: Initial data. Required.
|
922
|
-
:type body: IO
|
846
|
+
:type body: IO[bytes]
|
923
847
|
:param timeout: The timeout parameter is expressed in seconds. For more information, see
|
924
848
|
:code:`<a
|
925
849
|
href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting
|
@@ -929,14 +853,7 @@ class ContainerOperations:
|
|
929
853
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
930
854
|
value is None.
|
931
855
|
:type request_id_parameter: str
|
932
|
-
:
|
933
|
-
value may result in unsupported behavior.
|
934
|
-
:paramtype restype: str
|
935
|
-
:keyword comp: comp. Default value is "batch". Note that overriding this default value may
|
936
|
-
result in unsupported behavior.
|
937
|
-
:paramtype comp: str
|
938
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
939
|
-
:return: Async iterator of the response bytes or the result of cls(response)
|
856
|
+
:return: AsyncIterator[bytes] or the result of cls(response)
|
940
857
|
:rtype: AsyncIterator[bytes]
|
941
858
|
:raises ~azure.core.exceptions.HttpResponseError:
|
942
859
|
"""
|
@@ -960,7 +877,7 @@ class ContainerOperations:
|
|
960
877
|
|
961
878
|
_content = body
|
962
879
|
|
963
|
-
|
880
|
+
_request = build_submit_batch_request(
|
964
881
|
url=self._config.url,
|
965
882
|
content_length=content_length,
|
966
883
|
timeout=timeout,
|
@@ -970,16 +887,15 @@ class ContainerOperations:
|
|
970
887
|
multipart_content_type=multipart_content_type,
|
971
888
|
version=self._config.version,
|
972
889
|
content=_content,
|
973
|
-
template_url=self.submit_batch.metadata["url"],
|
974
890
|
headers=_headers,
|
975
891
|
params=_params,
|
976
892
|
)
|
977
|
-
|
978
|
-
|
893
|
+
_request = _convert_request(_request)
|
894
|
+
_request.url = self._client.format_url(_request.url)
|
979
895
|
|
980
896
|
_stream = True
|
981
897
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
982
|
-
|
898
|
+
_request, stream=_stream, **kwargs
|
983
899
|
)
|
984
900
|
|
985
901
|
response = pipeline_response.http_response
|
@@ -1001,8 +917,6 @@ class ContainerOperations:
|
|
1001
917
|
|
1002
918
|
return deserialized # type: ignore
|
1003
919
|
|
1004
|
-
submit_batch.metadata = {"url": "{url}"}
|
1005
|
-
|
1006
920
|
@distributed_trace_async
|
1007
921
|
async def filter_blobs(
|
1008
922
|
self,
|
@@ -1046,13 +960,6 @@ class ContainerOperations:
|
|
1046
960
|
:param include: Include this parameter to specify one or more datasets to include in the
|
1047
961
|
response. Default value is None.
|
1048
962
|
:type include: list[str or ~azure.storage.blob.models.FilterBlobsIncludeItem]
|
1049
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1050
|
-
value may result in unsupported behavior.
|
1051
|
-
:paramtype restype: str
|
1052
|
-
:keyword comp: comp. Default value is "blobs". Note that overriding this default value may
|
1053
|
-
result in unsupported behavior.
|
1054
|
-
:paramtype comp: str
|
1055
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1056
963
|
:return: FilterBlobSegment or the result of cls(response)
|
1057
964
|
:rtype: ~azure.storage.blob.models.FilterBlobSegment
|
1058
965
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1072,7 +979,7 @@ class ContainerOperations:
|
|
1072
979
|
comp: Literal["blobs"] = kwargs.pop("comp", _params.pop("comp", "blobs"))
|
1073
980
|
cls: ClsType[_models.FilterBlobSegment] = kwargs.pop("cls", None)
|
1074
981
|
|
1075
|
-
|
982
|
+
_request = build_filter_blobs_request(
|
1076
983
|
url=self._config.url,
|
1077
984
|
timeout=timeout,
|
1078
985
|
request_id_parameter=request_id_parameter,
|
@@ -1083,16 +990,15 @@ class ContainerOperations:
|
|
1083
990
|
restype=restype,
|
1084
991
|
comp=comp,
|
1085
992
|
version=self._config.version,
|
1086
|
-
template_url=self.filter_blobs.metadata["url"],
|
1087
993
|
headers=_headers,
|
1088
994
|
params=_params,
|
1089
995
|
)
|
1090
|
-
|
1091
|
-
|
996
|
+
_request = _convert_request(_request)
|
997
|
+
_request.url = self._client.format_url(_request.url)
|
1092
998
|
|
1093
999
|
_stream = False
|
1094
1000
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1095
|
-
|
1001
|
+
_request, stream=_stream, **kwargs
|
1096
1002
|
)
|
1097
1003
|
|
1098
1004
|
response = pipeline_response.http_response
|
@@ -1113,11 +1019,9 @@ class ContainerOperations:
|
|
1113
1019
|
deserialized = self._deserialize("FilterBlobSegment", pipeline_response)
|
1114
1020
|
|
1115
1021
|
if cls:
|
1116
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1117
|
-
|
1118
|
-
return deserialized
|
1022
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1119
1023
|
|
1120
|
-
|
1024
|
+
return deserialized # type: ignore
|
1121
1025
|
|
1122
1026
|
@distributed_trace_async
|
1123
1027
|
async def acquire_lease( # pylint: disable=inconsistent-return-statements
|
@@ -1151,16 +1055,6 @@ class ContainerOperations:
|
|
1151
1055
|
:type request_id_parameter: str
|
1152
1056
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1153
1057
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1154
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
1155
|
-
result in unsupported behavior.
|
1156
|
-
:paramtype comp: str
|
1157
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1158
|
-
value may result in unsupported behavior.
|
1159
|
-
:paramtype restype: str
|
1160
|
-
:keyword action: Describes what lease action to take. Default value is "acquire". Note that
|
1161
|
-
overriding this default value may result in unsupported behavior.
|
1162
|
-
:paramtype action: str
|
1163
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1164
1058
|
:return: None or the result of cls(response)
|
1165
1059
|
:rtype: None
|
1166
1060
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1187,7 +1081,7 @@ class ContainerOperations:
|
|
1187
1081
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1188
1082
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1189
1083
|
|
1190
|
-
|
1084
|
+
_request = build_acquire_lease_request(
|
1191
1085
|
url=self._config.url,
|
1192
1086
|
timeout=timeout,
|
1193
1087
|
duration=duration,
|
@@ -1199,16 +1093,15 @@ class ContainerOperations:
|
|
1199
1093
|
restype=restype,
|
1200
1094
|
action=action,
|
1201
1095
|
version=self._config.version,
|
1202
|
-
template_url=self.acquire_lease.metadata["url"],
|
1203
1096
|
headers=_headers,
|
1204
1097
|
params=_params,
|
1205
1098
|
)
|
1206
|
-
|
1207
|
-
|
1099
|
+
_request = _convert_request(_request)
|
1100
|
+
_request.url = self._client.format_url(_request.url)
|
1208
1101
|
|
1209
1102
|
_stream = False
|
1210
1103
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1211
|
-
|
1104
|
+
_request, stream=_stream, **kwargs
|
1212
1105
|
)
|
1213
1106
|
|
1214
1107
|
response = pipeline_response.http_response
|
@@ -1230,9 +1123,7 @@ class ContainerOperations:
|
|
1230
1123
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1231
1124
|
|
1232
1125
|
if cls:
|
1233
|
-
return cls(pipeline_response, None, response_headers)
|
1234
|
-
|
1235
|
-
acquire_lease.metadata = {"url": "{url}"}
|
1126
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1236
1127
|
|
1237
1128
|
@distributed_trace_async
|
1238
1129
|
async def release_lease( # pylint: disable=inconsistent-return-statements
|
@@ -1259,16 +1150,6 @@ class ContainerOperations:
|
|
1259
1150
|
:type request_id_parameter: str
|
1260
1151
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1261
1152
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1262
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
1263
|
-
result in unsupported behavior.
|
1264
|
-
:paramtype comp: str
|
1265
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1266
|
-
value may result in unsupported behavior.
|
1267
|
-
:paramtype restype: str
|
1268
|
-
:keyword action: Describes what lease action to take. Default value is "release". Note that
|
1269
|
-
overriding this default value may result in unsupported behavior.
|
1270
|
-
:paramtype action: str
|
1271
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1272
1153
|
:return: None or the result of cls(response)
|
1273
1154
|
:rtype: None
|
1274
1155
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1295,7 +1176,7 @@ class ContainerOperations:
|
|
1295
1176
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1296
1177
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1297
1178
|
|
1298
|
-
|
1179
|
+
_request = build_release_lease_request(
|
1299
1180
|
url=self._config.url,
|
1300
1181
|
lease_id=lease_id,
|
1301
1182
|
timeout=timeout,
|
@@ -1306,16 +1187,15 @@ class ContainerOperations:
|
|
1306
1187
|
restype=restype,
|
1307
1188
|
action=action,
|
1308
1189
|
version=self._config.version,
|
1309
|
-
template_url=self.release_lease.metadata["url"],
|
1310
1190
|
headers=_headers,
|
1311
1191
|
params=_params,
|
1312
1192
|
)
|
1313
|
-
|
1314
|
-
|
1193
|
+
_request = _convert_request(_request)
|
1194
|
+
_request.url = self._client.format_url(_request.url)
|
1315
1195
|
|
1316
1196
|
_stream = False
|
1317
1197
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1318
|
-
|
1198
|
+
_request, stream=_stream, **kwargs
|
1319
1199
|
)
|
1320
1200
|
|
1321
1201
|
response = pipeline_response.http_response
|
@@ -1336,9 +1216,7 @@ class ContainerOperations:
|
|
1336
1216
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1337
1217
|
|
1338
1218
|
if cls:
|
1339
|
-
return cls(pipeline_response, None, response_headers)
|
1340
|
-
|
1341
|
-
release_lease.metadata = {"url": "{url}"}
|
1219
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1342
1220
|
|
1343
1221
|
@distributed_trace_async
|
1344
1222
|
async def renew_lease( # pylint: disable=inconsistent-return-statements
|
@@ -1365,16 +1243,6 @@ class ContainerOperations:
|
|
1365
1243
|
:type request_id_parameter: str
|
1366
1244
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1367
1245
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1368
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
1369
|
-
result in unsupported behavior.
|
1370
|
-
:paramtype comp: str
|
1371
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1372
|
-
value may result in unsupported behavior.
|
1373
|
-
:paramtype restype: str
|
1374
|
-
:keyword action: Describes what lease action to take. Default value is "renew". Note that
|
1375
|
-
overriding this default value may result in unsupported behavior.
|
1376
|
-
:paramtype action: str
|
1377
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1378
1246
|
:return: None or the result of cls(response)
|
1379
1247
|
:rtype: None
|
1380
1248
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1401,7 +1269,7 @@ class ContainerOperations:
|
|
1401
1269
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1402
1270
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1403
1271
|
|
1404
|
-
|
1272
|
+
_request = build_renew_lease_request(
|
1405
1273
|
url=self._config.url,
|
1406
1274
|
lease_id=lease_id,
|
1407
1275
|
timeout=timeout,
|
@@ -1412,16 +1280,15 @@ class ContainerOperations:
|
|
1412
1280
|
restype=restype,
|
1413
1281
|
action=action,
|
1414
1282
|
version=self._config.version,
|
1415
|
-
template_url=self.renew_lease.metadata["url"],
|
1416
1283
|
headers=_headers,
|
1417
1284
|
params=_params,
|
1418
1285
|
)
|
1419
|
-
|
1420
|
-
|
1286
|
+
_request = _convert_request(_request)
|
1287
|
+
_request.url = self._client.format_url(_request.url)
|
1421
1288
|
|
1422
1289
|
_stream = False
|
1423
1290
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1424
|
-
|
1291
|
+
_request, stream=_stream, **kwargs
|
1425
1292
|
)
|
1426
1293
|
|
1427
1294
|
response = pipeline_response.http_response
|
@@ -1443,9 +1310,7 @@ class ContainerOperations:
|
|
1443
1310
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1444
1311
|
|
1445
1312
|
if cls:
|
1446
|
-
return cls(pipeline_response, None, response_headers)
|
1447
|
-
|
1448
|
-
renew_lease.metadata = {"url": "{url}"}
|
1313
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1449
1314
|
|
1450
1315
|
@distributed_trace_async
|
1451
1316
|
async def break_lease( # pylint: disable=inconsistent-return-statements
|
@@ -1478,16 +1343,6 @@ class ContainerOperations:
|
|
1478
1343
|
:type request_id_parameter: str
|
1479
1344
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1480
1345
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1481
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
1482
|
-
result in unsupported behavior.
|
1483
|
-
:paramtype comp: str
|
1484
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1485
|
-
value may result in unsupported behavior.
|
1486
|
-
:paramtype restype: str
|
1487
|
-
:keyword action: Describes what lease action to take. Default value is "break". Note that
|
1488
|
-
overriding this default value may result in unsupported behavior.
|
1489
|
-
:paramtype action: str
|
1490
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1491
1346
|
:return: None or the result of cls(response)
|
1492
1347
|
:rtype: None
|
1493
1348
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1514,7 +1369,7 @@ class ContainerOperations:
|
|
1514
1369
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1515
1370
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1516
1371
|
|
1517
|
-
|
1372
|
+
_request = build_break_lease_request(
|
1518
1373
|
url=self._config.url,
|
1519
1374
|
timeout=timeout,
|
1520
1375
|
break_period=break_period,
|
@@ -1525,16 +1380,15 @@ class ContainerOperations:
|
|
1525
1380
|
restype=restype,
|
1526
1381
|
action=action,
|
1527
1382
|
version=self._config.version,
|
1528
|
-
template_url=self.break_lease.metadata["url"],
|
1529
1383
|
headers=_headers,
|
1530
1384
|
params=_params,
|
1531
1385
|
)
|
1532
|
-
|
1533
|
-
|
1386
|
+
_request = _convert_request(_request)
|
1387
|
+
_request.url = self._client.format_url(_request.url)
|
1534
1388
|
|
1535
1389
|
_stream = False
|
1536
1390
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1537
|
-
|
1391
|
+
_request, stream=_stream, **kwargs
|
1538
1392
|
)
|
1539
1393
|
|
1540
1394
|
response = pipeline_response.http_response
|
@@ -1556,9 +1410,7 @@ class ContainerOperations:
|
|
1556
1410
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1557
1411
|
|
1558
1412
|
if cls:
|
1559
|
-
return cls(pipeline_response, None, response_headers)
|
1560
|
-
|
1561
|
-
break_lease.metadata = {"url": "{url}"}
|
1413
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1562
1414
|
|
1563
1415
|
@distributed_trace_async
|
1564
1416
|
async def change_lease( # pylint: disable=inconsistent-return-statements
|
@@ -1590,16 +1442,6 @@ class ContainerOperations:
|
|
1590
1442
|
:type request_id_parameter: str
|
1591
1443
|
:param modified_access_conditions: Parameter group. Default value is None.
|
1592
1444
|
:type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions
|
1593
|
-
:keyword comp: comp. Default value is "lease". Note that overriding this default value may
|
1594
|
-
result in unsupported behavior.
|
1595
|
-
:paramtype comp: str
|
1596
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1597
|
-
value may result in unsupported behavior.
|
1598
|
-
:paramtype restype: str
|
1599
|
-
:keyword action: Describes what lease action to take. Default value is "change". Note that
|
1600
|
-
overriding this default value may result in unsupported behavior.
|
1601
|
-
:paramtype action: str
|
1602
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1603
1445
|
:return: None or the result of cls(response)
|
1604
1446
|
:rtype: None
|
1605
1447
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1626,7 +1468,7 @@ class ContainerOperations:
|
|
1626
1468
|
_if_modified_since = modified_access_conditions.if_modified_since
|
1627
1469
|
_if_unmodified_since = modified_access_conditions.if_unmodified_since
|
1628
1470
|
|
1629
|
-
|
1471
|
+
_request = build_change_lease_request(
|
1630
1472
|
url=self._config.url,
|
1631
1473
|
lease_id=lease_id,
|
1632
1474
|
proposed_lease_id=proposed_lease_id,
|
@@ -1638,16 +1480,15 @@ class ContainerOperations:
|
|
1638
1480
|
restype=restype,
|
1639
1481
|
action=action,
|
1640
1482
|
version=self._config.version,
|
1641
|
-
template_url=self.change_lease.metadata["url"],
|
1642
1483
|
headers=_headers,
|
1643
1484
|
params=_params,
|
1644
1485
|
)
|
1645
|
-
|
1646
|
-
|
1486
|
+
_request = _convert_request(_request)
|
1487
|
+
_request.url = self._client.format_url(_request.url)
|
1647
1488
|
|
1648
1489
|
_stream = False
|
1649
1490
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1650
|
-
|
1491
|
+
_request, stream=_stream, **kwargs
|
1651
1492
|
)
|
1652
1493
|
|
1653
1494
|
response = pipeline_response.http_response
|
@@ -1669,9 +1510,7 @@ class ContainerOperations:
|
|
1669
1510
|
response_headers["Date"] = self._deserialize("rfc-1123", response.headers.get("Date"))
|
1670
1511
|
|
1671
1512
|
if cls:
|
1672
|
-
return cls(pipeline_response, None, response_headers)
|
1673
|
-
|
1674
|
-
change_lease.metadata = {"url": "{url}"}
|
1513
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|
1675
1514
|
|
1676
1515
|
@distributed_trace_async
|
1677
1516
|
async def list_blob_flat_segment(
|
@@ -1715,13 +1554,6 @@ class ContainerOperations:
|
|
1715
1554
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
1716
1555
|
value is None.
|
1717
1556
|
:type request_id_parameter: str
|
1718
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1719
|
-
value may result in unsupported behavior.
|
1720
|
-
:paramtype restype: str
|
1721
|
-
:keyword comp: comp. Default value is "list". Note that overriding this default value may
|
1722
|
-
result in unsupported behavior.
|
1723
|
-
:paramtype comp: str
|
1724
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1725
1557
|
:return: ListBlobsFlatSegmentResponse or the result of cls(response)
|
1726
1558
|
:rtype: ~azure.storage.blob.models.ListBlobsFlatSegmentResponse
|
1727
1559
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1741,7 +1573,7 @@ class ContainerOperations:
|
|
1741
1573
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
1742
1574
|
cls: ClsType[_models.ListBlobsFlatSegmentResponse] = kwargs.pop("cls", None)
|
1743
1575
|
|
1744
|
-
|
1576
|
+
_request = build_list_blob_flat_segment_request(
|
1745
1577
|
url=self._config.url,
|
1746
1578
|
prefix=prefix,
|
1747
1579
|
marker=marker,
|
@@ -1752,16 +1584,15 @@ class ContainerOperations:
|
|
1752
1584
|
restype=restype,
|
1753
1585
|
comp=comp,
|
1754
1586
|
version=self._config.version,
|
1755
|
-
template_url=self.list_blob_flat_segment.metadata["url"],
|
1756
1587
|
headers=_headers,
|
1757
1588
|
params=_params,
|
1758
1589
|
)
|
1759
|
-
|
1760
|
-
|
1590
|
+
_request = _convert_request(_request)
|
1591
|
+
_request.url = self._client.format_url(_request.url)
|
1761
1592
|
|
1762
1593
|
_stream = False
|
1763
1594
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1764
|
-
|
1595
|
+
_request, stream=_stream, **kwargs
|
1765
1596
|
)
|
1766
1597
|
|
1767
1598
|
response = pipeline_response.http_response
|
@@ -1783,11 +1614,9 @@ class ContainerOperations:
|
|
1783
1614
|
deserialized = self._deserialize("ListBlobsFlatSegmentResponse", pipeline_response)
|
1784
1615
|
|
1785
1616
|
if cls:
|
1786
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1787
|
-
|
1788
|
-
return deserialized
|
1617
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1789
1618
|
|
1790
|
-
|
1619
|
+
return deserialized # type: ignore
|
1791
1620
|
|
1792
1621
|
@distributed_trace_async
|
1793
1622
|
async def list_blob_hierarchy_segment(
|
@@ -1837,13 +1666,6 @@ class ContainerOperations:
|
|
1837
1666
|
limit that is recorded in the analytics logs when storage analytics logging is enabled. Default
|
1838
1667
|
value is None.
|
1839
1668
|
:type request_id_parameter: str
|
1840
|
-
:keyword restype: restype. Default value is "container". Note that overriding this default
|
1841
|
-
value may result in unsupported behavior.
|
1842
|
-
:paramtype restype: str
|
1843
|
-
:keyword comp: comp. Default value is "list". Note that overriding this default value may
|
1844
|
-
result in unsupported behavior.
|
1845
|
-
:paramtype comp: str
|
1846
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1847
1669
|
:return: ListBlobsHierarchySegmentResponse or the result of cls(response)
|
1848
1670
|
:rtype: ~azure.storage.blob.models.ListBlobsHierarchySegmentResponse
|
1849
1671
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1863,7 +1685,7 @@ class ContainerOperations:
|
|
1863
1685
|
comp: Literal["list"] = kwargs.pop("comp", _params.pop("comp", "list"))
|
1864
1686
|
cls: ClsType[_models.ListBlobsHierarchySegmentResponse] = kwargs.pop("cls", None)
|
1865
1687
|
|
1866
|
-
|
1688
|
+
_request = build_list_blob_hierarchy_segment_request(
|
1867
1689
|
url=self._config.url,
|
1868
1690
|
delimiter=delimiter,
|
1869
1691
|
prefix=prefix,
|
@@ -1875,16 +1697,15 @@ class ContainerOperations:
|
|
1875
1697
|
restype=restype,
|
1876
1698
|
comp=comp,
|
1877
1699
|
version=self._config.version,
|
1878
|
-
template_url=self.list_blob_hierarchy_segment.metadata["url"],
|
1879
1700
|
headers=_headers,
|
1880
1701
|
params=_params,
|
1881
1702
|
)
|
1882
|
-
|
1883
|
-
|
1703
|
+
_request = _convert_request(_request)
|
1704
|
+
_request.url = self._client.format_url(_request.url)
|
1884
1705
|
|
1885
1706
|
_stream = False
|
1886
1707
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1887
|
-
|
1708
|
+
_request, stream=_stream, **kwargs
|
1888
1709
|
)
|
1889
1710
|
|
1890
1711
|
response = pipeline_response.http_response
|
@@ -1906,23 +1727,14 @@ class ContainerOperations:
|
|
1906
1727
|
deserialized = self._deserialize("ListBlobsHierarchySegmentResponse", pipeline_response)
|
1907
1728
|
|
1908
1729
|
if cls:
|
1909
|
-
return cls(pipeline_response, deserialized, response_headers)
|
1910
|
-
|
1911
|
-
return deserialized
|
1730
|
+
return cls(pipeline_response, deserialized, response_headers) # type: ignore
|
1912
1731
|
|
1913
|
-
|
1732
|
+
return deserialized # type: ignore
|
1914
1733
|
|
1915
1734
|
@distributed_trace_async
|
1916
1735
|
async def get_account_info(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
|
1917
1736
|
"""Returns the sku name and account kind.
|
1918
1737
|
|
1919
|
-
:keyword restype: restype. Default value is "account". Note that overriding this default value
|
1920
|
-
may result in unsupported behavior.
|
1921
|
-
:paramtype restype: str
|
1922
|
-
:keyword comp: comp. Default value is "properties". Note that overriding this default value may
|
1923
|
-
result in unsupported behavior.
|
1924
|
-
:paramtype comp: str
|
1925
|
-
:keyword callable cls: A custom type or function that will be passed the direct response
|
1926
1738
|
:return: None or the result of cls(response)
|
1927
1739
|
:rtype: None
|
1928
1740
|
:raises ~azure.core.exceptions.HttpResponseError:
|
@@ -1942,21 +1754,20 @@ class ContainerOperations:
|
|
1942
1754
|
comp: Literal["properties"] = kwargs.pop("comp", _params.pop("comp", "properties"))
|
1943
1755
|
cls: ClsType[None] = kwargs.pop("cls", None)
|
1944
1756
|
|
1945
|
-
|
1757
|
+
_request = build_get_account_info_request(
|
1946
1758
|
url=self._config.url,
|
1947
1759
|
restype=restype,
|
1948
1760
|
comp=comp,
|
1949
1761
|
version=self._config.version,
|
1950
|
-
template_url=self.get_account_info.metadata["url"],
|
1951
1762
|
headers=_headers,
|
1952
1763
|
params=_params,
|
1953
1764
|
)
|
1954
|
-
|
1955
|
-
|
1765
|
+
_request = _convert_request(_request)
|
1766
|
+
_request.url = self._client.format_url(_request.url)
|
1956
1767
|
|
1957
1768
|
_stream = False
|
1958
1769
|
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
|
1959
|
-
|
1770
|
+
_request, stream=_stream, **kwargs
|
1960
1771
|
)
|
1961
1772
|
|
1962
1773
|
response = pipeline_response.http_response
|
@@ -1977,6 +1788,4 @@ class ContainerOperations:
|
|
1977
1788
|
response_headers["x-ms-account-kind"] = self._deserialize("str", response.headers.get("x-ms-account-kind"))
|
1978
1789
|
|
1979
1790
|
if cls:
|
1980
|
-
return cls(pipeline_response, None, response_headers)
|
1981
|
-
|
1982
|
-
get_account_info.metadata = {"url": "{url}"}
|
1791
|
+
return cls(pipeline_response, None, response_headers) # type: ignore
|