共用方式為


az monitor diagnostic-settings categories

擷取服務診斷設定類別。

命令

名稱 Description 類型 狀態
az monitor diagnostic-settings categories list

列出指定資源的診斷設定類別。

核心 GA
az monitor diagnostic-settings categories show

取得指定資源的診斷設定類別。

核心 GA

az monitor diagnostic-settings categories list

列出指定資源的診斷設定類別。

az monitor diagnostic-settings categories list --resource
                                               [--resource-group]
                                               [--resource-namespace]
                                               [--resource-parent]
                                               [--resource-type]

範例

使用資源識別碼列出診斷設定類別

az monitor diagnostic-settings categories list --resource /subscriptions/00000000-0000-0000- 0000-000000000000/resourcegroups/myRG/providers/microsoft.logic/workflows/myWorkflow

使用資源名稱列出診斷設定類別

az monitor diagnostic-settings categories list -g myRG --resource-type microsoft.logic/workflows --resource myWorkflow

必要參數

--resource

目標資源的名稱或識別碼。

選擇性參數

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--resource-namespace

目標資源提供者命名空間。

--resource-parent

如果適用,則以資源父路徑為目標。

--resource-type

目標資源類型。 也可以接受命名空間/類型格式(例如:'Microsoft.Compute/virtualMachines')。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az monitor diagnostic-settings categories show

取得指定資源的診斷設定類別。

az monitor diagnostic-settings categories show --name
                                               --resource
                                               [--resource-group]
                                               [--resource-namespace]
                                               [--resource-parent]
                                               [--resource-type]

必要參數

--name -n

診斷設定的名稱。 必要。

--resource

目標資源的名稱或識別碼。

選擇性參數

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--resource-namespace

目標資源提供者命名空間。

--resource-parent

如果適用,則以資源父路徑為目標。

--resource-type

目標資源類型。 也可以接受命名空間/類型格式(例如:'Microsoft.Compute/virtualMachines')。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。