-
Notifications
You must be signed in to change notification settings - Fork 234
/
azure.storage.blob.aio.ContainerClient.yml
1764 lines (1397 loc) · 65.4 KB
/
azure.storage.blob.aio.ContainerClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### YamlMime:PythonClass
uid: azure.storage.blob.aio.ContainerClient
name: ContainerClient
fullName: azure.storage.blob.aio.ContainerClient
module: azure.storage.blob.aio
inheritances:
- azure.storage.blob._shared.base_client_async.AsyncStorageAccountHostsMixin
- azure.storage.blob._container_client.ContainerClient
- azure.storage.blob._encryption.StorageEncryptionMixin
summary: 'A client to interact with a specific container, although that container
may not yet exist.
For operations relating to a specific blob within this container, a blob client
can be
retrieved using the <xref:azure.storage.blob.aio.ContainerClient.get_blob_client>
function.'
constructor:
syntax: 'ContainerClient(account_url: str, container_name: str, credential: str
| Dict[str, str] | AzureNamedKeyCredential | AzureSasCredential | AsyncTokenCredential
| None = None, **kwargs: Any)'
parameters:
- name: account_url
description: 'The URI to the storage account. In order to create a client given
the full URI to the container,
use the <xref:azure.storage.blob.aio.ContainerClient.from_container_url> classmethod.'
isRequired: true
types:
- <xref:str>
- name: container_name
description: The name of the container for the blob.
isRequired: true
types:
- <xref:str>
- name: credential
description: 'The credentials with which to authenticate. This is optional if
the
account URL already has a SAS token. The value can be a SAS token string,
an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
an account shared access key, or an instance of a TokenCredentials class from
azure.identity.
If the resource URI already contains a SAS token, this will be ignored in favor
of an explicit credential
- except in the case of AzureSasCredential, where the conflicting SAS tokens
will raise a ValueError.
If using an instance of AzureNamedKeyCredential, "name" should be the storage
account name, and "key"
should be the storage account key.'
defaultValue: None
keywordOnlyParameters:
- name: api_version
description: 'The Storage API version to use for requests. Default value is the
most recent service version that is
compatible with the current SDK. Setting to an older version may result in reduced
feature compatibility.
*New in version 12.2.0.*'
types:
- <xref:str>
- name: secondary_hostname
description: The hostname of the secondary endpoint.
types:
- <xref:str>
- name: max_block_size
description: 'The maximum chunk size for uploading a block blob in chunks.
Defaults to 4*1024*1024, or 4MB.'
types:
- <xref:int>
- name: max_single_put_size
description: 'If the blob size is less than or equal max_single_put_size, then
the blob will be
uploaded with only one http PUT request. If the blob size is larger than max_single_put_size,
the blob will be uploaded in chunks. Defaults to 64*1024*1024, or 64MB.'
types:
- <xref:int>
- name: min_large_block_upload_threshold
description: 'The minimum chunk size required to use the memory efficient
algorithm when uploading a block blob. Defaults to 4*1024*1024+1.'
types:
- <xref:int>
- name: use_byte_buffer
description: Use a byte buffer for block blob uploads. Defaults to False.
types:
- <xref:bool>
- name: max_page_size
description: The maximum chunk size for uploading a page blob. Defaults to 4*1024*1024,
or 4MB.
types:
- <xref:int>
- name: max_single_get_size
description: 'The maximum size for a blob to be downloaded in a single call,
the exceeded part will be downloaded in chunks (could be parallel). Defaults
to 32*1024*1024, or 32MB.'
types:
- <xref:int>
- name: max_chunk_get_size
description: 'The maximum chunk size used for downloading a blob. Defaults to
4*1024*1024,
or 4MB.'
types:
- <xref:int>
- name: audience
description: 'The audience to use when requesting tokens for Azure Active Directory
authentication. Only has an effect when credential is of type TokenCredential.
The value could be
[https://storage.azure.com/](https://storage.azure.com/) (default) or [https:/](https:/)/<account>.blob.core.windows.net.'
types:
- <xref:str>
methods:
- uid: azure.storage.blob.aio.ContainerClient.acquire_lease
name: acquire_lease
summary: 'Requests a new lease. If the container does not have an active lease,
the Blob service creates a lease on the container and returns a new
lease ID.'
signature: 'async acquire_lease(lease_duration: int = -1, lease_id: str | None =
None, **kwargs) -> BlobLeaseClient'
parameters:
- name: lease_duration
description: 'Specifies the duration of the lease, in seconds, or negative one
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change. Default is -1 (infinite lease).'
isRequired: true
types:
- <xref:int>
- name: lease_id
description: 'Proposed lease ID, in a GUID string format. The Blob service returns
400 (Invalid request) if the proposed lease ID is not in the correct format.'
isRequired: true
types:
- <xref:str>
keywordOnlyParameters:
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: A BlobLeaseClient object, that can be run in a context manager.
types:
- <xref:azure.storage.blob.aio.BlobLeaseClient>
- uid: azure.storage.blob.aio.ContainerClient.close
name: close
summary: 'This method is to close the sockets opened by the client.
It need not be used when using with a context manager.'
signature: async close()
- uid: azure.storage.blob.aio.ContainerClient.create_container
name: create_container
summary: 'Creates a new container under the specified account. If the container
with the same name already exists, the operation fails.'
signature: 'async create_container(metadata: Dict[str, str] | None = None, public_access:
PublicAccess | str | None = None, **kwargs: Any) -> Dict[str, str | datetime]'
parameters:
- name: metadata
description: 'A dict with name_value pairs to associate with the
container as metadata. Example:{''Category'':''test''}'
isRequired: true
types:
- <xref:dict>[<xref:str>, <xref:str>]
- name: public_access
description: 'Possible values include: ''container'', ''blob''.'
isRequired: true
types:
- <xref:azure.storage.blob.PublicAccess>
keywordOnlyParameters:
- name: container_encryption_scope
description: 'Specifies the default encryption scope to set on the container and
use for
all future writes.
*New in version 12.2.0.*'
types:
- <xref:dict>
- <xref:azure.storage.blob.ContainerEncryptionScope>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: A dictionary of response headers.
types:
- <xref:typing.Dict>[<xref:str>, <xref:typing.Union>[<xref:str>, <xref:datetime>]]
- uid: azure.storage.blob.aio.ContainerClient.delete_blob
name: delete_blob
summary: 'Marks the specified blob or snapshot for deletion.
The blob is later deleted during garbage collection.
Note that in order to delete a blob, you must delete all of its
snapshots. You can delete both at the same time with the delete_blob
operation.
If a delete retention policy is enabled for the service, then this operation soft
deletes the blob or snapshot
and retains the blob or snapshot for specified number of days.
After specified number of days, blob''s data is removed from the service during
garbage collection.
Soft deleted blobs or snapshots are accessible through <xref:azure.storage.blob.aio.ContainerClient.list_blobs>
specifying *include=["deleted"]*
Soft-deleted blob or snapshot can be restored using <xref:azure.storage.blob.aio.BlobClient.undelete>'
signature: 'async delete_blob(blob: str, delete_snapshots: str | None = None, **kwargs:
Any) -> None'
parameters:
- name: blob
description: The blob with which to interact.
isRequired: true
types:
- <xref:str>
- name: delete_snapshots
description: "Required if the blob has associated snapshots. Values include:\n\
\ * \"only\": Deletes only the blobs snapshots. \n\n * \"include\": Deletes\
\ the blob along with all snapshots."
isRequired: true
types:
- <xref:str>
keywordOnlyParameters:
- name: version_id
description: "The version id parameter is an opaque DateTime\nvalue that, when\
\ present, specifies the version of the blob to delete.\n\n*New in version 12.4.0.*\
\ \n\nThis keyword argument was introduced in API version '2019-12-12'."
types:
- <xref:str>
- name: lease
description: 'Required if the blob has an active lease. Value can be a Lease object
or the lease ID as a string.'
types:
- <xref:azure.storage.blob.aio.BlobLeaseClient>
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
types:
- <xref:None>
- uid: azure.storage.blob.aio.ContainerClient.delete_blobs
name: delete_blobs
summary: 'Marks the specified blobs or snapshots for deletion.
The blobs are later deleted during garbage collection.
Note that in order to delete blobs, you must delete all of their
snapshots. You can delete both at the same time with the delete_blobs operation.
If a delete retention policy is enabled for the service, then this operation soft
deletes the blobs or snapshots
and retains the blobs or snapshots for specified number of days.
After specified number of days, blobs'' data is removed from the service during
garbage collection.
Soft deleted blobs or snapshots are accessible through <xref:azure.storage.blob.aio.ContainerClient.list_blobs>
specifying *include=["deleted"]*
Soft-deleted blobs or snapshots can be restored using <xref:azure.storage.blob.aio.BlobClient.undelete>
The maximum number of blobs that can be deleted in a single request is 256.'
signature: 'async delete_blobs(*blobs: str | Dict[str, Any] | BlobProperties, **kwargs:
Any) -> AsyncIterator[AsyncHttpResponse]'
parameters:
- name: blobs
description: "The blobs to delete. This can be a single blob, or multiple values\
\ can\nbe supplied, where each value is either the name of the blob (str) or\
\ BlobProperties.\n\n\n> [!NOTE]\n> When the blob type is dict, here's a list\
\ of keys, value rules.\n>\n> \n>\n> blob name:\n>\n> \n>\n> key: 'name', value\
\ type: str\n>\n> \n>\n> snapshot you want to delete:\n>\n> \n>\n> key: 'snapshot',\
\ value type: str\n>\n> \n>\n> whether to delete snapshots when deleting blob:\n\
>\n> \n>\n> key: 'delete_snapshots', value: 'include' or 'only'\n>\n> \n>\n\
> if the blob modified or not:\n>\n> \n>\n> key: 'if_modified_since', 'if_unmodified_since',\
\ value type: datetime\n>\n> \n>\n> etag:\n>\n> \n>\n> key: 'etag', value type:\
\ str\n>\n> \n>\n> match the etag or not:\n>\n> \n>\n> key: 'match_condition',\
\ value type: MatchConditions\n>\n> \n>\n> tags match condition:\n>\n> \n>\n\
> key: 'if_tags_match_condition', value type: str\n>\n> \n>\n> lease:\n>\n>\
\ \n>\n> key: 'lease_id', value type: Union[str, LeaseClient]\n>\n> \n>\n> timeout\
\ for subrequest:\n>\n> \n>\n> key: 'timeout', value type: int\n>"
isRequired: true
types:
- <xref:str>
- <xref:dict>(<xref:str>, <xref:typing.Any>)
- <xref:azure.storage.blob.BlobProperties>
keywordOnlyParameters:
- name: delete_snapshots
description: "Required if a blob has associated snapshots. Values include:\n \
\ * \"only\": Deletes only the blobs snapshots. \n\n * \"include\": Deletes\
\ the blob along with all snapshots."
types:
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: raise_on_any_failure
description: 'This is a boolean param which defaults to True. When this is set,
an exception
is raised even if there is a single operation failure. For optimal performance,
this should be set to False'
types:
- <xref:bool>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: An async iterator of responses, one for each blob in order
types:
- <xref:asynciterator>[<xref:azure.core.pipeline.transport.AsyncHttpResponse>]
- uid: azure.storage.blob.aio.ContainerClient.delete_container
name: delete_container
summary: 'Marks the specified container for deletion. The container and any blobs
contained within it are later deleted during garbage collection.'
signature: 'async delete_container(**kwargs: Any) -> None'
keywordOnlyParameters:
- name: lease
description: 'If specified, delete_container only succeeds if the
container''s lease is active and matches this ID.
Required if the container has an active lease.'
types:
- <xref:azure.storage.blob.aio.BlobLeaseClient>
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
types:
- <xref:None>
- uid: azure.storage.blob.aio.ContainerClient.download_blob
name: download_blob
summary: 'Downloads a blob to the StorageStreamDownloader. The readall() method
must
be used to read all the content or readinto() must be used to download the blob
into
a stream. Using chunks() returns an async iterator which allows the user to iterate
over the content in chunks.'
signature: 'async download_blob(blob: str, offset: int = None, length: int = None,
*, encoding: str, **kwargs: Any) -> StorageStreamDownloader[str]'
parameters:
- name: blob
description: The blob with which to interact.
isRequired: true
types:
- <xref:str>
- name: offset
description: 'Start of byte range to use for downloading a section of the blob.
Must be set if length is provided.'
isRequired: true
types:
- <xref:int>
- name: length
description: 'Number of bytes to read from the stream. This is optional, but
should be supplied for optimal performance.'
isRequired: true
types:
- <xref:int>
keywordOnlyParameters:
- name: version_id
description: "The version id parameter is an opaque DateTime\nvalue that, when\
\ present, specifies the version of the blob to download.\n\n*New in version\
\ 12.4.0.* \n\nThis keyword argument was introduced in API version '2019-12-12'."
types:
- <xref:str>
- name: validate_content
description: 'If true, calculates an MD5 hash for each chunk of the blob. The
storage
service checks the hash of the content that has arrived with the hash
that was sent. This is primarily valuable for detecting bitflips on
the wire if using http instead of https, as https (the default), will
already validate. Note that this MD5 hash is not stored with the
blob. Also note that if enabled, the memory-efficient upload algorithm
will not be used because computing the MD5 hash requires buffering
entire blocks, and doing so defeats the purpose of the memory-efficient algorithm.'
types:
- <xref:bool>
- name: lease
description: 'Required if the blob has an active lease. If specified, download_blob
only
succeeds if the blob''s lease is active and matches this ID. Value can be a
BlobLeaseClient object or the lease ID as a string.'
types:
- <xref:azure.storage.blob.aio.BlobLeaseClient>
- <xref:str>
- name: if_modified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only
if the resource has been modified since the specified time.'
types:
- <xref:datetime.datetime>
- name: if_unmodified_since
description: 'A DateTime value. Azure expects the date value passed in to be UTC.
If timezone is included, any non-UTC datetimes will be converted to UTC.
If a date is passed in without timezone info, it is assumed to be UTC.
Specify this header to perform the operation only if
the resource has not been modified since the specified date/time.'
types:
- <xref:datetime.datetime>
- name: etag
description: 'An ETag value, or the wildcard character (*). Used to check if the
resource has changed,
and act according to the condition specified by the *match_condition* parameter.'
types:
- <xref:str>
- name: match_condition
description: The match condition to use upon the etag.
types:
- <xref:azure.core.MatchConditions>
- name: if_tags_match_condition
description: 'Specify a SQL where clause on blob tags to operate only on blob
with a matching value.
eg. `"\"tagname\"=''my tag''"`
*New in version 12.4.0.*'
types:
- <xref:str>
- name: cpk
description: 'Encrypts the data on the service-side with the given key.
Use of customer-provided keys must be done over HTTPS.
As the encryption key itself is provided in the request,
a secure connection must be established to transfer the key.'
types:
- <xref:azure.storage.blob.CustomerProvidedEncryptionKey>
- name: max_concurrency
description: The number of parallel connections with which to download.
types:
- <xref:int>
- name: encoding
description: Encoding to decode the downloaded bytes. Default is None, i.e. no
decoding.
types:
- <xref:str>
- name: progress_hook
description: 'An async callback to track the progress of a long running download.
The signature is
function(current: int, total: int) where current is the number of bytes transferred
so far, and total is the total size of the download.'
types:
- <xref:typing.Callable>[[<xref:int>, <xref:int>], <xref:typing.Awaitable>[<xref:None>]]
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).
This method may make multiple calls to the service and
the timeout will apply to each call individually.
multiple calls to the Azure service and the timeout will apply to
each call individually.'
types:
- <xref:int>
return:
description: A streaming object. (StorageStreamDownloader)
types:
- <xref:azure.storage.blob.aio.StorageStreamDownloader>
- uid: azure.storage.blob.aio.ContainerClient.exists
name: exists
summary: Returns True if a container exists and returns False otherwise.
signature: 'async exists(**kwargs: Any) -> bool'
keywordOnlyParameters:
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: boolean
types:
- <xref:bool>
- uid: azure.storage.blob.aio.ContainerClient.find_blobs_by_tags
name: find_blobs_by_tags
summary: 'Returns a generator to list the blobs under the specified container whose
tags
match the given search expression.
The generator will lazily follow the continuation tokens returned by
the service.'
signature: 'find_blobs_by_tags(filter_expression: str, **kwargs: Any | None) ->
AsyncItemPaged[FilteredBlob]'
parameters:
- name: filter_expression
description: 'The expression to find blobs whose tags matches the specified condition.
eg. ""yourtagname"=''firsttag'' and "yourtagname2"=''secondtag''"'
isRequired: true
types:
- <xref:str>
keywordOnlyParameters:
- name: results_per_page
description: The max result per page when paginating.
types:
- <xref:int>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: An iterable (auto-paging) response of FilteredBlob.
types:
- <xref:azure.core.paging.ItemPaged>[<xref:azure.storage.blob.BlobProperties>]
- uid: azure.storage.blob.aio.ContainerClient.from_connection_string
name: from_connection_string
summary: Create ContainerClient from a Connection String.
signature: 'from_connection_string(conn_str: str, container_name: str, credential:
str | Dict[str, str] | AzureNamedKeyCredential | AzureSasCredential | TokenCredential
| None = None, **kwargs: Any) -> Self'
parameters:
- name: conn_str
description: A connection string to an Azure Storage account.
isRequired: true
types:
- <xref:str>
- name: container_name
description: The container name for the blob.
isRequired: true
types:
- <xref:str>
- name: credential
description: 'The credentials with which to authenticate. This is optional if
the
account URL already has a SAS token, or the connection string already has shared
access key values. The value can be a SAS token string,
an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
an account shared access key, or an instance of a TokenCredentials class from
azure.identity.
Credentials provided here will take precedence over those in the connection
string.
If using an instance of AzureNamedKeyCredential, "name" should be the storage
account name, and "key"
should be the storage account key.'
defaultValue: None
types:
- <xref:azure.core.credentials.AzureNamedKeyCredential>
- <xref:azure.core.credentials.AzureSasCredential>
- <xref:azure.core.credentials.TokenCredential>
- <xref:str>
- <xref:dict>[<xref:str>, <xref:str>]
- <xref:None>
keywordOnlyParameters:
- name: audience
description: 'The audience to use when requesting tokens for Azure Active Directory
authentication. Only has an effect when credential is of type TokenCredential.
The value could be
[https://storage.azure.com/](https://storage.azure.com/) (default) or [https:/](https:/)/<account>.blob.core.windows.net.'
types:
- <xref:str>
return:
description: A container client.
types:
- <xref:azure.storage.blob.ContainerClient>
- uid: azure.storage.blob.aio.ContainerClient.from_container_url
name: from_container_url
summary: Create ContainerClient from a container url.
signature: 'from_container_url(container_url: str, credential: str | Dict[str, str]
| AzureNamedKeyCredential | AzureSasCredential | TokenCredential | None = None,
**kwargs: Any) -> Self'
parameters:
- name: container_url
description: 'The full endpoint URL to the Container, including SAS token if used.
This could be
either the primary endpoint, or the secondary endpoint depending on the current
*location_mode*.'
isRequired: true
types:
- <xref:str>
- name: credential
description: 'The credentials with which to authenticate. This is optional if
the
account URL already has a SAS token, or the connection string already has shared
access key values. The value can be a SAS token string,
an instance of a AzureSasCredential or AzureNamedKeyCredential from azure.core.credentials,
an account shared access key, or an instance of a TokenCredentials class from
azure.identity.
If the resource URI already contains a SAS token, this will be ignored in favor
of an explicit credential
- except in the case of AzureSasCredential, where the conflicting SAS tokens
will raise a ValueError.
If using an instance of AzureNamedKeyCredential, "name" should be the storage
account name, and "key"
should be the storage account key.'
defaultValue: None
types:
- <xref:azure.core.credentials.AzureNamedKeyCredential>
- <xref:azure.core.credentials.AzureSasCredential>
- <xref:azure.core.credentials.TokenCredential>
- <xref:str>
- <xref:dict>[<xref:str>, <xref:str>]
- <xref:None>
keywordOnlyParameters:
- name: audience
description: 'The audience to use when requesting tokens for Azure Active Directory
authentication. Only has an effect when credential is of type TokenCredential.
The value could be
[https://storage.azure.com/](https://storage.azure.com/) (default) or [https:/](https:/)/<account>.blob.core.windows.net.'
types:
- <xref:str>
return:
description: A container client.
types:
- <xref:azure.storage.blob.ContainerClient>
- uid: azure.storage.blob.aio.ContainerClient.get_account_information
name: get_account_information
summary: 'Gets information related to the storage account.
The information can also be retrieved if the user has a SAS to a container or
blob.
The keys in the returned dictionary include ''sku_name'' and ''account_kind''.'
signature: 'async get_account_information(**kwargs: Any) -> Dict[str, str]'
return:
description: A dict of account information (SKU and account type).
types:
- <xref:dict>(<xref:str>, <xref:str>)
- uid: azure.storage.blob.aio.ContainerClient.get_blob_client
name: get_blob_client
summary: 'Get a client to interact with the specified blob.
The blob need not already exist.'
signature: 'get_blob_client(blob: str, snapshot: str = None, *, version_id: str
| None = None) -> BlobClient'
parameters:
- name: blob
description: The blob with which to interact.
isRequired: true
types:
- <xref:str>
- name: snapshot
description: 'The optional blob snapshot on which to operate. This can be the
snapshot ID string
or the response returned from <xref:azure.storage.blob.aio.BlobClient.create_snapshot>.'
defaultValue: None
types:
- <xref:str>
keywordOnlyParameters:
- name: version_id
description: 'The version id parameter is an opaque DateTime value that, when
present,
specifies the version of the blob to operate on.'
types:
- <xref:str>
return:
description: A BlobClient.
types:
- <xref:azure.storage.blob.aio.BlobClient>
- uid: azure.storage.blob.aio.ContainerClient.get_container_access_policy
name: get_container_access_policy
summary: 'Gets the permissions for the specified container.
The permissions indicate whether container data may be accessed publicly.'
signature: 'async get_container_access_policy(**kwargs: Any) -> Dict[str, Any]'
keywordOnlyParameters:
- name: lease
description: 'If specified, get_container_access_policy only succeeds if the
container''s lease is active and matches this ID.'
types:
- <xref:azure.storage.blob.aio.BlobLeaseClient>
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more
details see
[https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations](https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations).
This value is not tracked or validated on the client. To configure client-side
network timesouts
see [here](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob#other-client--per-operation-configuration).'
types:
- <xref:int>
return:
description: Access policy information in a dict.
types:
- <xref:dict>[<xref:str>, <xref:typing.Any>]
- uid: azure.storage.blob.aio.ContainerClient.get_container_properties
name: get_container_properties
summary: 'Returns all user-defined metadata and system properties for the specified
container. The data returned does not include the container''s list of blobs.'
signature: 'async get_container_properties(**kwargs: Any) -> ContainerProperties'
keywordOnlyParameters:
- name: lease
description: 'If specified, get_container_properties only succeeds if the
container''s lease is active and matches this ID.'
types:
- <xref:azure.storage.blob.aio.BlobLeaseClient>
- <xref:str>
- name: timeout
description: 'Sets the server-side timeout for the operation in seconds. For more