簡體   English   中英

如何使用 python 中的 DataLakeServiceClient 獲取 Azure 中存在的容器列表

[英]How to get list of Containers present in Azure using DataLakeServiceClient in python

從 azure.storage.filedatalake 導入 DataLakeServiceClient service_client = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format("https", storage_account_name), credential=storage_account_key) 容器 = service_client.list_containers () 用於容器中的 c:打印 (c.name)

但我收到這樣的錯誤: AttributeError: 'DataLakeServiceClient' object has no attribute 'list_containers'

service_client = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format("https", storage_account_name), credential=storage_account_key) containers = service_client.list_file_systems() for c in containers: print (c.name)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM