[英]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?假设我有一个 workspaceId cb89596-80da-421e-b495-f65aac012bfd,我可以使用 az CLI 从中获取工作区的名称吗?
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:它将打印您的 Log Analytics 工作区的名称:
[
"DefaultWorkspace-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-WUS"
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.