Azure / Azure/azure-cli-extensions
[connectedmachine] add support for id/ids
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues)
### Related command
az connectedmachine extension [...]
### Extension name (the extension in question)
connectedmachine
### Description of issue (in as much detail as possible)
Hi,
I would like to see the connectedmachine extension work like the vm extension, ie accept id (or multiple ids) instead of the need to specify subscription/resource-group/machine-name.
So it should work more like vm extensions:
```
$ az vm extension list --help
Command
az vm extension list : List the extensions attached to a VM.
Arguments
Resource Id Arguments
--ids : One or more resource IDs (space-delimited). It should be a complete
resource ID containing all information of 'Resource Id' arguments. You
should provide either --ids or other 'Resource Id' arguments.
--resource-group -g : Name of resource group. You can configure the default group using `az
configure --defaults group=`.
--subscription : Name or ID of subscription. You can configure the default subscription
using `az account set -s NAME_OR_ID`.
--vm-name : The name of the Virtual Machine. You can configure the default using `az
configure --defaults vm=`.
Global Arguments
--debug : Increase logging verbosity to show all debug logs.
--help -h : Show this help message and exit.
--only-show-errors : Only show errors, suppressing warnings.
--output -o : Output format. Allowed values: json, jsonc, none, table, tsv, yaml,
yamlc. Default: json.
--query : JMESPath query string. See http://jmespath.org/ for more information and
examples.
--verbose : Increase logging verbosity. Use --debug for full debug logs.
Examples
List attached extensions to a named VM.
az vm extension list -g MyResourceGroup --vm-name MyVm
To search AI knowledge base for examples, use: az find "az vm extension list"
```
rather than like it works now:
```
$ az connectedmachine extension list --help
This command is from the following extension: connectedmachine
Command
az connectedmachine extension list : The operation to get all extensions of a non-Azure machine.
Arguments
--machine-name [Required] : The name of the machine containing the extension.
--resource-group -g [Required] : Name of resource group. You can configure the default group
using `az configure --defaults group=`.
--expand : The expand expression to apply on the operation.
Global Arguments
--debug : Increase logging verbosity to show all debug logs.
--help -h : Show this help message and exit.
--only-show-errors : Only show errors, suppressing warnings.
--output -o : Output format. Allowed values: json, jsonc, none, table, tsv,
yaml, yamlc. Default: json.
--query : JMESPath query string. See http://jmespath.org/ for more
information and examples.
--subscription : Name or ID of subscription. You can configure the default
subscription using `az account set -s NAME_OR_ID`.
--verbose : Increase logging verbosity. Use --debug for full debug logs.
Examples
Get all Machine Extensions
az connectedmachine extension list --machine-name "myMachine" --resource-group
"myResourceGroup"
To search AI knowledge base for examples, use: az find "az connectedmachine extension list"
```
-----
Contributor guide
Assessment
This issue has not been assessed yet.