Azure / Azure/azure-cli

az resource show --ids: CLI 2.0 Command doesnt work

Open
#18,526 1 comment 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**
I have a loop that get all of the resources in the cloud Id's and than executing the following command *For Each One*:
az resource show --ids --include-response-body true
For most of the services it work but when i get to Virtual Machines the loop is breaking and the error i got is:

ERROR: az resource: error: argument --ids: invalid Resource ID value: 'C:/Program Files/Git/subscriptions/'

The resource ID is correct because i get it from azure automatically and it works for other services.

**To Reproduce**
For VM -
az resource show --ids --include-response-body true

**Expected behavior**
the Expected behavior is to get the resource Json output from azure just like al of the other services

**Environment summary**
azure-cli-2.23.

**Additional context**
The Loop works for all of the services. I've tried to execute this shell command outside the python Code to understand the error and getting the error specified in the begining

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.