简体   繁体   中英

Is there a way to get the log-analytics workspace name from workspaceid using az cli?

Say I have a workspaceId cb89596-80da-421e-b495-f65aac012bfd, can I use az CLI to get the name of the workspace from this?

图像

Please try something like the following:

az monitor log-analytics workspace list --query "[?customerId == 'cb89596-80da-421e-b495-f65aac012bfd'].name"

It will print the name of your Log Analytics Workspace:

[
  "DefaultWorkspace-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-WUS"
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM