Issue with API Version when running AZ Command
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
Hi team,
When i tried to run az storage command we encountered API version error. The error looks like
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: APIVersion 2021-02-01 is not available
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python3.6/dist-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/usr/local/lib/python3.6/dist-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/lib/python3.6/dist-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/usr/local/lib/python3.6/dist-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
File "/usr/local/lib/python3.6/dist-packages/azure/cli/command_modules/storage/_client_factory.py", line 143, in cf_sa
return storage_client_factory(cli_ctx).storage_accounts
File "/usr/local/lib/python3.6/dist-packages/azure/mgmt/storage/_storage_management_client.py", line 413, in storage_accounts
raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2021-02-01 is not available
To open an issue, please run: 'az feedback'
The Azure CLI version is
/usr/local/bin/az --version
azure-cli 2.23.0
core 2.23.0
telemetry 1.0.6
Running from Azure Devops
=============================================================================
Task : Azure CLI
Description : Run Azure CLI commands against an Azure subscription in a Shell script when running on Linux agent or Batch script when running on Windows agent.
Version : 1.164.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: eeedb9a7-2aed-6727-4cfb-1515809d676e
* Version Independent ID: 2c83180d-22ad-db42-e2eb-f27f11977963
* Content: [az](https://docs.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/reference-index.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/reference-index.yml)
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**
Contributor guide
Assessment
This issue has not been assessed yet.