/
azure.storage.blob.aio.BlobServiceClient.yml
767 lines (611 loc) · 28 KB
/
azure.storage.blob.aio.BlobServiceClient.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
### YamlMime:PythonClass
uid: azure.storage.blob.aio.BlobServiceClient
name: BlobServiceClient
fullName: azure.storage.blob.aio.BlobServiceClient
module: azure.storage.blob.aio
inheritances:
- azure.storage.blob._shared.base_client_async.AsyncStorageAccountHostsMixin
- azure.storage.blob._blob_service_client.BlobServiceClient
- azure.storage.blob._encryption.StorageEncryptionMixin
summary: 'A client to interact with the Blob Service at the account level.
This client provides operations to retrieve and configure the account properties
as well as list, create and delete containers within the account.
For operations relating to a specific container or blob, clients for those entities
can also be retrieved using the *get_client* functions.'
constructor:
syntax: 'BlobServiceClient(account_url: str, credential: str | Dict[str, str] |
AzureNamedKeyCredential | AzureSasCredential | AsyncTokenCredential | None = None,
**kwargs: Any)'
parameters:
- name: account_url
description: 'The URL to the blob storage account. Any other entities included
in the URL path (e.g. container or blob) will be discarded. This URL can be
optionally
authenticated with a SAS token.'
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>
methods:
- uid: azure.storage.blob.aio.BlobServiceClient.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.BlobServiceClient.create_container
name: create_container
summary: 'Creates a new container under the specified account.
If the container with the same name already exists, a ResourceExistsError will
be raised. This method returns a client with which to interact with the newly
created container.'
signature: 'async create_container(name: str, metadata: Dict[str, str] | None =
None, public_access: PublicAccess | str | None = None, **kwargs) -> ContainerClient'
parameters:
- name: name
description: The name of the container to create.
isRequired: true
types:
- <xref:str>
- 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:str>
- <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:
types:
- <xref:azure.storage.blob.aio.ContainerClient>
- uid: azure.storage.blob.aio.BlobServiceClient.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.
If the container is not found, a ResourceNotFoundError will be raised.'
signature: 'async delete_container(container: ContainerProperties | str, lease:
BlobLeaseClient | str | None = None, **kwargs) -> None'
parameters:
- name: container
description: 'The container to delete. This can either be the name of the container,
or an instance of ContainerProperties.'
isRequired: true
types:
- <xref:str>
- <xref:azure.storage.blob.ContainerProperties>
- 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.'
isRequired: true
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:
types:
- <xref:None>
- uid: azure.storage.blob.aio.BlobServiceClient.find_blobs_by_tags
name: find_blobs_by_tags
summary: 'The Filter Blobs operation enables callers to list blobs across all
containers whose tags match a given search expression. Filter blobs
searches across all containers within a storage account but can be
scoped within the expression to a single container.'
signature: 'find_blobs_by_tags(filter_expression: str, **kwargs: Any) -> AsyncItemPaged[FilteredBlob]'
parameters:
- name: filter_expression
description: 'The expression to find blobs whose tags matches the specified condition.
eg. ""yourtagname"=''firsttag'' and "yourtagname2"=''secondtag''"
To specify a container, eg. "@container=''containerName'' and "Name"=''C''"'
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 BlobProperties.
types:
- <xref:azure.core.async_paging.AsyncItemPaged>[<xref:azure.storage.blob.FilteredBlob>]
- uid: azure.storage.blob.aio.BlobServiceClient.from_connection_string
name: from_connection_string
summary: Create BlobServiceClient from a Connection String.
signature: 'from_connection_string(conn_str: 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: 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
return:
description: A Blob service client.
types:
- <xref:azure.storage.blob.BlobServiceClient>
- uid: azure.storage.blob.aio.BlobServiceClient.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.BlobServiceClient.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(container: ContainerProperties | str, blob: BlobProperties
| str, snapshot: Dict[str, Any] | str | None = None, *, version_id: str | None
= None) -> BlobClient'
parameters:
- name: container
description: 'The container that the blob is in. This can either be the name of
the container,
or an instance of ContainerProperties.'
isRequired: true
types:
- <xref:str>
- <xref:azure.storage.blob.ContainerProperties>
- name: blob
description: 'The blob with which to interact. This can either be the name of
the blob,
or an instance of BlobProperties.'
isRequired: true
types:
- <xref:str>
- <xref:azure.storage.blob.BlobProperties>
- name: snapshot
description: 'The optional blob snapshot on which to operate. This can either
be the ID of the snapshot,
or a dictionary output returned by
<xref:azure.storage.blob.aio.BlobClient.create_snapshot>.'
defaultValue: None
types:
- <xref:str>
- <xref:dict>(<xref:str>, <xref:typing.Any>)
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.BlobServiceClient.get_container_client
name: get_container_client
summary: 'Get a client to interact with the specified container.
The container need not already exist.'
signature: 'get_container_client(container: ContainerProperties | str) -> ContainerClient'
parameters:
- name: container
description: 'The container. This can either be the name of the container,
or an instance of ContainerProperties.'
isRequired: true
types:
- <xref:str>
- <xref:azure.storage.blob.ContainerProperties>
return:
description: A ContainerClient.
types:
- <xref:azure.storage.blob.aio.ContainerClient>
- uid: azure.storage.blob.aio.BlobServiceClient.get_service_properties
name: get_service_properties
summary: 'Gets the properties of a storage account''s Blob service, including
Azure Storage Analytics.'
signature: 'async get_service_properties(**kwargs: Any) -> Dict[str, Any]'
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: 'An object containing blob service properties such as
analytics logging, hour/minute metrics, cors rules, etc.'
types:
- <xref:typing.Dict>[<xref:str>, <xref:typing.Any>]
- uid: azure.storage.blob.aio.BlobServiceClient.get_service_stats
name: get_service_stats
summary: 'Retrieves statistics related to replication for the Blob service.
It is only available when read-access geo-redundant replication is enabled for
the storage account.
With geo-redundant replication, Azure Storage maintains your data durable
in two locations. In both locations, Azure Storage constantly maintains
multiple healthy replicas of your data. The location where you read,
create, update, or delete data is the primary storage account location.
The primary location exists in the region you choose at the time you
create an account via the Azure Management Azure classic portal, for
example, North Central US. The location to which your data is replicated
is the secondary location. The secondary location is automatically
determined based on the location of the primary; it is in a second data
center that resides in the same region as the primary location. Read-only
access is available from the secondary location, if read-access geo-redundant
replication is enabled for your storage account.'
signature: 'async get_service_stats(**kwargs: Any) -> Dict[str, Any]'
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: The blob service stats.
types:
- <xref:typing.Dict>[<xref:str>, <xref:typing.Any>]
- uid: azure.storage.blob.aio.BlobServiceClient.get_user_delegation_key
name: get_user_delegation_key
summary: 'Obtain a user delegation key for the purpose of signing SAS tokens.
A token credential must be present on the service object for this request to succeed.'
signature: 'async get_user_delegation_key(key_start_time: datetime, key_expiry_time:
datetime, **kwargs: Any) -> UserDelegationKey'
parameters:
- name: key_start_time
description: A DateTime value. Indicates when the key becomes valid.
isRequired: true
types:
- <xref:datetime.datetime>
- name: key_expiry_time
description: A DateTime value. Indicates when the key stops being valid.
isRequired: true
types:
- <xref:datetime.datetime>
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: The user delegation key.
types:
- <xref:azure.storage.blob.UserDelegationKey>
- uid: azure.storage.blob.aio.BlobServiceClient.list_containers
name: list_containers
summary: 'Returns a generator to list the containers under the specified account.
The generator will lazily follow the continuation tokens returned by
the service and stop when all containers have been returned.'
signature: 'list_containers(name_starts_with: str | None = None, include_metadata:
bool | None = False, **kwargs) -> AsyncItemPaged[ContainerProperties]'
parameters:
- name: name_starts_with
description: 'Filters the results to return only containers whose names
begin with the specified prefix.'
isRequired: true
types:
- <xref:str>
- name: include_metadata
description: 'Specifies that container metadata to be returned in the response.
The default value is *False*.'
isRequired: true
types:
- <xref:bool>
keywordOnlyParameters:
- name: include_deleted
description: 'Specifies that deleted containers to be returned in the response.
This is for container restore enabled
account. The default value is *False*.
.. versionadded:: 12.4.0'
types:
- <xref:bool>
- name: include_system
description: 'Flag specifying that system containers should be included.
.. versionadded:: 12.10.0'
types:
- <xref:bool>
- name: results_per_page
description: 'The maximum number of container names to retrieve per API
call. If the request does not specify the server will return up to 5,000 items.'
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) of ContainerProperties.
types:
- <xref:azure.core.async_paging.AsyncItemPaged>[<xref:azure.storage.blob.ContainerProperties>]
- uid: azure.storage.blob.aio.BlobServiceClient.set_service_properties
name: set_service_properties
summary: 'Sets the properties of a storage account''s Blob service, including
Azure Storage Analytics.
If an element (e.g. analytics_logging) is left as None, the
existing settings on the service for that functionality are preserved.'
signature: 'async set_service_properties(analytics_logging: BlobAnalyticsLogging
| None = None, hour_metrics: Metrics | None = None, minute_metrics: Metrics |
None = None, cors: List[CorsRule] | None = None, target_version: str | None =
None, delete_retention_policy: RetentionPolicy | None = None, static_website:
StaticWebsite | None = None, **kwargs) -> None'
parameters:
- name: analytics_logging
description: Groups the Azure Analytics Logging settings.
isRequired: true
types:
- <xref:azure.storage.blob.BlobAnalyticsLogging>
- name: hour_metrics
description: 'The hour metrics settings provide a summary of request
statistics grouped by API in hourly aggregates for blobs.'
isRequired: true
types:
- <xref:azure.storage.blob.Metrics>
- name: minute_metrics
description: 'The minute metrics settings provide request statistics
for each minute for blobs.'
isRequired: true
types:
- <xref:azure.storage.blob.Metrics>
- name: cors
description: 'You can include up to five CorsRule elements in the
list. If an empty list is specified, all CORS rules will be deleted,
and CORS will be disabled for the service.'
isRequired: true
types:
- <xref:list>[<xref:azure.storage.blob.CorsRule>]
- name: target_version
description: 'Indicates the default version to use for requests if an incoming
request''s version is not specified.'
isRequired: true
types:
- <xref:str>
- name: delete_retention_policy
description: 'The delete retention policy specifies whether to retain deleted
blobs.
It also specifies the number of days and versions of blob to keep.'
isRequired: true
types:
- <xref:azure.storage.blob.RetentionPolicy>
- name: static_website
description: 'Specifies whether the static website feature is enabled,
and if yes, indicates the index document and 404 error document to use.'
isRequired: true
types:
- <xref:azure.storage.blob.StaticWebsite>
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:
types:
- <xref:None>
- uid: azure.storage.blob.aio.BlobServiceClient.undelete_container
name: undelete_container
summary: 'Restores soft-deleted container.
Operation will only be successful if used within the specified number of days
set in the delete retention policy.
*New in version 12.4.0:* This operation was introduced in API version ''2019-12-12''.'
signature: 'async undelete_container(deleted_container_name: str, deleted_container_version:
str, **kwargs: Any) -> ContainerClient'
parameters:
- name: deleted_container_name
description: Specifies the name of the deleted container to restore.
isRequired: true
types:
- <xref:str>
- name: deleted_container_version
description: Specifies the version of the deleted container to restore.
isRequired: true
types:
- <xref:str>
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: The recovered soft-deleted ContainerClient.
types:
- <xref:azure.storage.blob.aio.ContainerClient>
attributes:
- uid: azure.storage.blob.aio.BlobServiceClient.api_version
name: api_version
summary: The version of the Storage API used for requests.
- uid: azure.storage.blob.aio.BlobServiceClient.location_mode
name: location_mode
summary: 'The location mode that the client is currently using.
By default this will be "primary". Options include "primary" and "secondary".'
- uid: azure.storage.blob.aio.BlobServiceClient.primary_endpoint
name: primary_endpoint
summary: The full primary endpoint URL.
- uid: azure.storage.blob.aio.BlobServiceClient.primary_hostname
name: primary_hostname
summary: The hostname of the primary endpoint.
- uid: azure.storage.blob.aio.BlobServiceClient.secondary_endpoint
name: secondary_endpoint
summary: 'The full secondary endpoint URL if configured.
If not available a ValueError will be raised. To explicitly specify a secondary
hostname, use the optional
*secondary_hostname* keyword argument on instantiation.'
exceptions:
- type: ValueError
- uid: azure.storage.blob.aio.BlobServiceClient.secondary_hostname
name: secondary_hostname
summary: 'The hostname of the secondary endpoint.
If not available this will be None. To explicitly specify a secondary hostname,
use the optional
*secondary_hostname* keyword argument on instantiation.'
- uid: azure.storage.blob.aio.BlobServiceClient.url
name: url
summary: 'The full endpoint URL to this entity, including SAS token if used.
This could be either the primary endpoint,
or the secondary endpoint depending on the current <xref:azure.storage.blob.aio.BlobServiceClient.location_mode>.
:returns: The full endpoint URL to this entity, including SAS token if used.
:rtype: str'