python SDK azure-mgmt-storage removed v2023_05_01 and added v2024_01_01 but API version '2024-01-01' not available in Azure China
we has been using python SDK azure-mgmt-storage for a while but recently we encountered an error as below,
2025-02-20T07:15:38.202 [Error] Executed 'Functions.httpGenerateTempSASTokenForOneDataPortal' (Failed, Id=43880530-afa8-4c22-962c-3f4cacf8c3ac, Duration=2085ms)
Result: Failure
Exception: HttpResponseError: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2024-01-01' for type 'storageAccounts'. The supported api-versions are '2023-05-01, 2023-04-01, 2023-01-01, 2022-09-01, 2022-05-01, 2021-09-01, 2021-08-01, 2021-06-01, 2021-05-01, 2021-04-01, 2021-02-01, 2021-01-01, 2020-08-01-preview, 2019-06-01, 2019-04-01, 2018-11-01, 2018-07-01, 2018-03-01-preview, 2018-02-01, 2017-10-01, 2017-06-01, 2016-12-01, 2016-07-01, 2016-05-01, 2016-01-01, 2015-06-15, 2015-05-01-preview'. The supported locations are 'chinanorth, chinaeast, chinanorth2, chinaeast2, chinanorth3'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'chinanorth3' and API version '2024-01-01' for type 'storageAccounts'. The supported api-versions are '2023-05-01, 2023-04-01, 2023-01-01, 2022-09-01, 2022-05-01, 2021-09-01, 2021-08-01, 2021-06-01, 2021-05-01, 2021-04-01, 2021-02-01, 2021-01-01, 2020-08-01-preview, 2019-06-01, 2019-04-01, 2018-11-01, 2018-07-01, 2018-03-01-preview, 2018-02-01, 2017-10-01, 2017-06-01, 2016-12-01, 2016-07-01, 2016-05-01, 2016-01-01, 2015-06-15, 2015-05-01-preview'. The supported locations are 'chinanorth, chinaeast, chinanorth2, chinaeast2, chinanorth3'.
Stack:`` ``File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/dispatcher.py", line 661, in _handle__invocation_request
``call_result = await self._loop.run_in_executor(
``^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
``result = self.fn(*self.args, **self.kwargs)
``^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/dispatcher.py", line 990, in _run_sync_func
``return ExtensionManager.get_sync_invocation_wrapper(context,
``^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/extension.py", line 211, in _raw_invocation_wrapper
``result = function(**args)
``^^^^^^^^^^^^^^^^
``File "/home/site/wwwroot/httpGenerateTempSASTokenForOneDataPortal/__init__.py", line 84, in main
keys = storageClient.storage_accounts.list_keys(
``^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``File "/home/site/wwwroot/.python_packages/lib/site-packages/azure/core/tracing/decorator.py", line 105, in wrapper_use_tracer
``return func(*args, **kwargs)
``^^^^^^^^^^^^^^^^^^^^^
``File "/home/site/wwwroot/.python_packages/lib/site-packages
/azure/mgmt/storage/v2024_01_01
/operations/_storage_accounts_operations.py", line 1514, in list_keys
``raise HttpResponseError(response=response, error_format=ARMErrorFormat)
we tried to pass parameter api_version to specify api version to be '2023-05-01' (according to the document
https://learn.microsoft.com/en-us/python/api/azure-mgmt-storage/azure.mgmt.storage.v2023_05_01?view=azure-python
,but today we found this document had been removed, we just viewed it yesterday
) but we got error , then we checked the installed SDK packages and found v2023_05_01 package was not there, at last we specified api version to be "2019-06-01" and solved this issue. So the issue is that in Azure China API version '2024-01-01' for type 'storageAccounts' is still not available and you removed the last newest version v2023_05_01 package, now we can only use v2019_06_01 package, pls fix this in Azure China, thank you.