Linux command
az-extension 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List installed extensions
az extension list
List available extensions
az extension list-available
Install an extension
az extension add --name [extension_name]
Install a specific version
az extension add --name [extension_name] --version [1.2.3]
Update an extension
az extension update --name [extension_name]
Remove an extension
az extension remove --name [extension_name]
Install from a local wheel file
az extension add --source [path/to/extension.whl]
Show extension details
az extension show --name [extension_name]
说明
az extension is a subcommand of the Azure CLI that manages CLI extensions. Extensions add new command groups and capabilities to the Azure CLI without updating the core installation. Extensions are Python packages distributed as wheel files. They can be installed from the official Azure extension index, URLs, or local files. Some Azure services require extensions before their commands are available. Extensions are installed per-user and can have different versions than what is bundled with the CLI. Dynamic installation can be enabled to automatically prompt for extension installation when using unavailable commands.
参数
- list
- Show currently installed extensions.
- list-available
- Show extensions available for installation.
- add
- Install an extension.
- update
- Update an extension to latest version.
- remove
- Uninstall an extension.
- show
- Display details about an installed extension.
- list-versions
- List available versions of an extension.
- --name _name_
- Extension name.
- --source _path_
- Path or URL to wheel file.
- --version _version_
- Specific version to install.
- --yes
- Do not prompt for confirmation.
- --upgrade
- Update if already installed.
- --pip-extra-index-urls _urls_
- Additional PyPI index URLs.
FAQ
What is the az-extension command used for?
az extension is a subcommand of the Azure CLI that manages CLI extensions. Extensions add new command groups and capabilities to the Azure CLI without updating the core installation. Extensions are Python packages distributed as wheel files. They can be installed from the official Azure extension index, URLs, or local files. Some Azure services require extensions before their commands are available. Extensions are installed per-user and can have different versions than what is bundled with the CLI. Dynamic installation can be enabled to automatically prompt for extension installation when using unavailable commands.
How do I run a basic az-extension example?
Run `az extension list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does list do in az-extension?
Show currently installed extensions.