0

I am trying to update Azure storage accounts through the Azure python SDK. I follow the documentation and can authenticate against Azure just fine.

However when I run code to update the parameters of the storage account I get the following error: 'minimum_tls_version is not a known attribute of class <class 'azure.mgmt.storage.v2019_06_01.models._models_py3.StorageAccountUpdateParameters'> and will be ignored'

reference from microsoft saying it should exist: https://learn.microsoft.com/en-us/python/api/azure-mgmt-storage/azure.mgmt.storage.v2019_06_01.models.storageaccountupdateparameters?view=azure-python

Code in question: storage_account = self.storage.storage_accounts.update(resource_group, storage_account_name, StorageAccountUpdateParameters(enable_https_traffic_only=True, minimum_tls_version='TLS1_1' ))

Any help or direction is appreciate.

1 Answer 1

1

This parameter is a new parameter released in version 11.1.0 release on 2020-6-22. Any chance you are using an old package? The doc would show the latest one only.

ChangeLog is available on PyPI: https://pypi.org/project/azure-mgmt-storage/

(I work at MS in the SDK team)

Sign up to request clarification or add additional context in comments.

3 Comments

Yes I just doubled checked that it was updated properly. Maybe I am putting this in wrong: self.storage = StorageManagementClient(credentials, SUBSCRIPTION) self.client.providers.register('Microsoft.Storage') storage_account = self.storage.storage_accounts.update(resource_group, storage_account_name, StorageAccountUpdateParameters(enable_https_traffic_only=True,allow_blob_public_access=False))
Figured it out: I had downloaded the most 'update to date' Azure storage SDK but it didn't. I went and downloaded the most recent version, specifically 11.1.0 Thanks for the insight! Solid work on the SDK
Thanks! I'm glad it's working now :). On top of the Stackoverflow, if you have any questions you can always ask a question on Github too github.com/Azure/azure-sdk-for-python/issues. Have a great rest of your day :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.