我正在尝试编写Python脚本以在Azure存储帐户上启用“已启用安全传输”。我在理解以下代码所需的内容时遇到了一些麻烦:
storage_account = storage_client.storage_accounts.update(
GROUP_NAME, STORAGE_ACCOUNT_NAME,
StorageAccountUpdateParameters(enable_https_traffic_only(bool=true))
)
我尝试了几乎所有我能想到的组合来将此值设置为true,有人能使这种情况起作用吗?
答案 0 :(得分:0)
您的代码不是有效的Python:
storage_account = storage_client.storage_accounts.update(
GROUP_NAME, STORAGE_ACCOUNT_NAME,
StorageAccountUpdateParameters(enable_https_traffic_only = True)
)
此页面可能会帮助: https://github.com/Azure-Samples/storage-python-manage/blob/master/example.py