我正在编写python代码,以从我创建的ibm对象存储中获取容器列表。
我已经安装了swiftclient,keystoneclient以及cerftifi pyopenssl软件包。
import swiftclient.client as swiftclient
auth_url = "<auth_url>"
project_id = "<Project_id>"
user_id = "<user_id>"
region_name = "<region_name>"
password = "<password>"
conn = swiftclient.Connection(
key = password,
authurl = auth_url,
auth_version = '3',
os_options = {"project_id": project_id,
"user_id": user_id,
"region_name": region_name})
for container in conn.get_account():
print(container['name'])
我想获取容器的名称 而是给我一个错误,例如禁止访问。
答案 0 :(得分:0)
请在IBM Cloud控制台中打开支持凭单以查看您的帐户。