az alias
Note
This reference is part of the alias extension for the Azure CLI (version 2.0.31.dev0 or higher). The extension will automatically install the first time you run an az alias command. Learn more about extensions.
Manage Azure CLI Aliases.
Commands
Name | Description | Type | Status |
---|---|---|---|
az alias create |
Create an alias. |
Extension | GA |
az alias export |
Export all registered aliases to a given path, as an INI configuration file. If no export path is specified, the alias configuration file is exported to the current working directory. |
Extension | GA |
az alias import |
Import aliases from an INI configuration file or an URL. |
Extension | GA |
az alias list |
List the registered aliases. |
Extension | GA |
az alias remove |
Remove one or more aliases. Aliases to be removed are space-delimited. |
Extension | GA |
az alias remove-all |
Remove all registered aliases. |
Extension | GA |
az alias create
Create an alias.
az alias create --command
--name
Examples
Create simple alias commands.
az alias create --name rg --command group
az alias create --name ls --command list
Create a complex alias.
az alias create --name list-vm --command 'vm list --resource-group myResourceGroup'
Create an alias command with arguments.
az alias create --name 'list-vm {{ resource_group }}' \
--command 'vm list --resource-group {{ resource_group }}'
Process arguments using Jinja2 templates.
az alias create --name 'storage-ls {{ url }}' \
--command 'storage blob list
--account-name {{ url.replace("https://", "").split(".")[0] }}
--container-name {{ url.replace("https://", "").split("/")[1] }}'
Required Parameters
The command that the alias points to.
The name of the alias.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az alias export
Export all registered aliases to a given path, as an INI configuration file. If no export path is specified, the alias configuration file is exported to the current working directory.
az alias export [--exclude]
[--path]
Optional Parameters
Space-separated aliases excluded from export.
The path of the alias configuration file to export to.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az alias import
Import aliases from an INI configuration file or an URL.
az alias import --source
Required Parameters
The source of the aliases to import from.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az alias list
List the registered aliases.
az alias list
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az alias remove
Remove one or more aliases. Aliases to be removed are space-delimited.
az alias remove --name
Required Parameters
Space-separated aliases.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az alias remove-all
Remove all registered aliases.
az alias remove-all [--yes]
Optional Parameters
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.