[英]List all Resource locks within all Resource Groups with Kusto
I am trying to make a query that will allow me to view every Resource Lock within our Resource Groups and I have gotten nowhere with it.我正在尝试进行查询,以允许我查看资源组中的每个资源锁,但我无处可去。 I am very new to Kusto and help would be appreciated!我对 Kusto 很陌生,我们将不胜感激!
As per my Knowledge, we can pull the list of resource that having locks in the subscription by using either rest Api or from Azure CLI根据我的知识,我们可以使用 rest Api 或 Azure CLI 来拉取锁定订阅的资源列表
From Azure CLI,we can use the below command从 Azure CLI,我们可以使用以下命令
az lock list [--filter-string] [--namespace] [--parent] [--query-examples] [--resource] [--resource-group] [--resource-type] [--subscription]
Here is the rest API, to pull the management locks, at subscription level这是 rest API,在订阅级别拉管理锁
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks?api-version=2016-09-01 GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks?api-version=2016-09-01
if you want to pull the Management locks at resource level you need to specify the particular resource group & lock name as well如果要在资源级别拉管理锁,则还需要指定特定的资源组和锁名称
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}?api-version=2016-09-01 GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}?api-version=2016-09-01
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.