简体   繁体   English

如何使用 az CLI 获取 Azure Log Analytics 的工作区 ID?

[英]How to get workspace ID of Azure Log Analytics using az CLI?

How to get workspace ID of Azure Log Analytics using az CLI?如何使用az CLI 获取 Azure Log Analytics 的工作区 ID?

I want to use this ID in a script when creating AKS我想在创建 AKS 时在脚本中使用此 ID

az aks create --name myk8s --resource-group rg-myk8s \
  --workspace-resource-id XXX

在此处输入图像描述

You can run the following command to get the Workspace ID:您可以运行以下命令来获取工作区 ID:

az monitor log-analytics workspace show --resource-group MyResourceGroup --workspace-name MyWorkspace --query customerId -o tsv

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法使用 az cli 从 workspaceid 获取日志分析工作区名称? - Is there a way to get the log-analytics workspace name from workspaceid using az cli? 使用Az CLI将Azure活动日志连接到Log Analytics实例 - Connecting Azure Activity Log to Log Analytics instance using Az CLI 如何通过C#获取Azure Log Analytics工作区的工作区ID - How to get the Workspace ID of an Azure Log Analytics workspace via C# 如何使用来自 Gitlab CI 运行器的 az cli 登录到 Azure? - How to log in to Azure using az cli from a Gitlab CI runner? 如何在 Azure Log Analytics 工作区中获取 Windows 安全事件? - How to get Windows Security Events in Azure Log Analytics Workspace? 获取 Azure 中连接到不同订阅中的工作区的虚拟机的 Log Analytics 工作区 ID - Get Log analytics workspace ID of a virtual machine in Azure connected to a workspace in a different subscription 如何使用 az ml cli 获取在 Azure 机器学习服务 Model 注册表中注册的最新版本的 Model ID? - How to get Model ID of the Latest Version registered in Azure Machine Learning Service Model Registry using az ml cli? 如何轮换 Azure 日志分析工作区的密钥 - How to rotate keys for azure log analytics workspace 是否有任何 API 可用于使用工作区 ID 获取特定日志分析工作区中的所有资源 - Is there any api available to get all resources in particular log analytics workspace using workspace id 如何通过 PowerShell 脚本从 Azure Log Analytics 工作区获取自定义日志表? - How to get Custom Log tables from Azure Log Analytics Workspace through PowerShell script?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM