azure-cli: `az resource show`: CLI 2.0 command provided in "Resource Explorer" does not work

Describe the bug When I cut’n paste the Azure CLI v2.0 command from https://resources.azure.com/subscriptions I get: $ az resource show --id /subscriptions/deadbeaf-1111-2222-3333-666666666666/resources --api-version 2017-05-10 az resource: error: argument --ids: invalid ResourceId value: ‘/subscriptions/deadbeef-1111-2222-3333-666666666666/resources’

To Reproduce Login to https://resources.azure.com/ Under subscriptions click on resources Cut’n paste the command from the Azure CLI v2.0 tab

Expected behavior I expect to receive the same json as in data tab of https://resources.azure.com

Environment summary rpm fedora 28 install:

# rpm -qf /bin/az
azure-cli-2.0.33-1.el7.x86_64

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

I would say no. The Azure CLI script tab was removed because the scripts in it were not actually verified to work. The resource explorer cannot make statements about what the CLI command should do, but should instead rely on what the CLI does. Since the type of ID does not work in the CLI, it should never have appeared in the Resource Explorer. I would recommend closing this. @yugangw-msft thoughts?