简体   繁体   English

有没有办法使用 az cli 从 workspaceid 获取日志分析工作区名称?

[英]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.

相关问题 如何使用 az CLI 获取 Azure Log Analytics 的工作区 ID? - How to get workspace ID of Azure Log Analytics using az CLI? 使用Az CLI将Azure活动日志连接到Log Analytics实例 - Connecting Azure Activity Log to Log Analytics instance using Az CLI 是否可以从工作区 ID 获取 OMS Log Analytics 工作区名称 - Is it possible to get the OMS Log Analytics workpace name from the Workspace ID 如何使用来自 Gitlab CI 运行器的 az cli 登录到 Azure? - How to log in to Azure using az cli from a Gitlab CI runner? azure TenantId是否等效于azure日志分析WorkspaceId? - Is azure TenantId equivalent to azure log analytics WorkspaceId? 有没有办法使用 Powershell 获取有关哪个 VM 连接到哪个 Log Analytics 工作区的详细信息? - Is there a way to get details of which VM connected to which Log Analytics Workspace using Powershell? 是否可以使用Powershell获取Azure资源所属的Log Analytics Workspace? - Is there a way to get which Log Analytics Workspace an Azure Resource belongs to using Powershell? 有没有办法从Log analytics工作区向IIS Insights提供IIS日志? - Is there a way to feed IIS logs into App Insights from Log analytics workspace? 是否有任何 API 可用于使用工作区 ID 获取特定日志分析工作区中的所有资源 - Is there any api available to get all resources in particular log analytics workspace using workspace id 从 Log Analytics Workspace 在 Azure 上设置警报 - Set an alert on Azure from Log Analytics Workspace
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM