[英]How do I set enable_https_traffic_only using Python SDK in Azure?
I am trying to write a Python script to enable "Secure transfer enabled" on an Azure storage account. 我正在尝试编写Python脚本以在Azure存储帐户上启用“已启用安全传输”。 I'm having some trouble understanding what I need to put in for the following piece of code: 我在理解以下代码所需的内容时遇到了一些麻烦:
storage_account = storage_client.storage_accounts.update(
GROUP_NAME, STORAGE_ACCOUNT_NAME,
StorageAccountUpdateParameters(enable_https_traffic_only(bool=true))
)
I've tried just about every combination I can think of to set this value to true, has anyone got this scenario to work? 我已经尝试过几乎可以想到的每种组合来将此值设置为true,有人能使这种情况起作用吗?
Your code is not valid Python: 您的代码不是有效的Python:
storage_account = storage_client.storage_accounts.update(
GROUP_NAME, STORAGE_ACCOUNT_NAME,
StorageAccountUpdateParameters(enable_https_traffic_only = True)
)
This page might help: https://github.com/Azure-Samples/storage-python-manage/blob/master/example.py 该页面可能会有所帮助: https : //github.com/Azure-Samples/storage-python-manage/blob/master/example.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.