0

I am trying to write a Python script to enable "Secure transfer enabled" on an Azure storage account. 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?

NOhs
  • 2,780
  • 3
  • 25
  • 59
ChrisB
  • 1

1 Answers1

0

Your code is not valid 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

Laurent Mazuel
  • 3,422
  • 13
  • 27
  • Thanks Laurent - I'd tried lots of different combinations, the code I pasted was just the last one in desperation. Your advice worked - life saver! – ChrisB Jul 17 '19 at 08:21