az monitor log-profiles

記錄管理設定檔。

命令

名稱 Description 類型 狀態
az monitor log-profiles create

在 Azure 監視 REST API 中建立記錄設定檔。

核心 GA
az monitor log-profiles delete

刪除記錄設定檔。

核心 GA
az monitor log-profiles list

列出記錄設定檔。

核心 GA
az monitor log-profiles show

取得記錄檔設定檔。

核心 GA
az monitor log-profiles update

更新 Azure 監視 REST API 中的記錄設定檔。

核心 GA

az monitor log-profiles create

在 Azure 監視 REST API 中建立記錄設定檔。

az monitor log-profiles create --categories
                               --days
                               --enabled {0, 1, f, false, n, no, t, true, y, yes}
                               --location
                               --locations
                               --name
                               [--service-bus-rule-id]
                               [--storage-account-id]
                               [--tags]

範例

建立記錄檔設定檔。 (自動產生)

az monitor log-profiles create --categories "Delete" --days 0 --enabled true --location westus2 --locations westus --name MyLogProfile --service-bus-rule-id "/subscriptions/{YOUR SUBSCRIPTION ID}/resourceGroups/{RESOURCE GROUP NAME}/providers/Microsoft.EventHub/namespaces/{EVENT HUB NAME SPACE}/authorizationrules/RootManageSharedAccessKey"

必要參數

--categories

記錄的空間分隔類別。 這些類別會建立為方便使用者。 某些值包括:'Write'、'Delete'和/或 'Action'。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

--days

保留天數。 值為 0 會無限期地保留事件。

--enabled

是否啟用保留原則。 允許的值:false、true。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--location -l

位置。​​ 來自的值: az account list-locations 。 您可以使用 來設定預設位置 az configure --defaults location=<location>

--locations

應儲存活動記錄事件的區域空間分隔清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

--name -n

記錄檔設定檔的名稱。

選擇性參數

--service-bus-rule-id

您想要在其中建立事件中樞以串流活動記錄的服務匯流排命名空間服務匯流排規則識別碼。 規則識別碼的格式為:'{服務匯流排資源識別碼}/authorizationrules/{key name}'。

--storage-account-id

您要傳送活動記錄的儲存體帳戶資源識別碼。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 '' 清除現有的標記。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

全域參數
--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 log-profiles delete

刪除記錄設定檔。

az monitor log-profiles delete [--ids]
                               [--name]
                               [--subscription]

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

記錄檔設定檔的名稱。

--subscription

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

全域參數
--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 log-profiles list

列出記錄設定檔。

az monitor log-profiles list
全域參數
--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 log-profiles show

取得記錄檔設定檔。

az monitor log-profiles show [--ids]
                             [--name]
                             [--subscription]

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

記錄檔設定檔的名稱。

--subscription

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

全域參數
--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 log-profiles update

更新 Azure 監視 REST API 中的記錄設定檔。

az monitor log-profiles update [--add]
                               [--categories]
                               [--days]
                               [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
                               [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                               [--ids]
                               [--locations]
                               [--name]
                               [--remove]
                               [--service-bus-rule-id]
                               [--set]
                               [--storage-account-id]
                               [--subscription]
                               [--tags]

選擇性參數

--add

藉由指定路徑和索引鍵值組,將 物件加入物件清單。 範例:--add property.listProperty < key=value、string 或 JSON 字串 > 。

--categories

記錄的空間分隔類別。 這些類別會建立為方便使用者。 某些值包括:'Write'、'Delete'和/或 'Action'。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

--days

保留天數。 值為 0 會無限期地保留事件。

--enabled

是否啟用保留原則。 允許的值:false、true。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--force-string

使用 'set' 或 'add' 時,請保留字元串常值,而不是嘗試轉換成 JSON。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--locations

應儲存活動記錄事件的區域空間分隔清單。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

--name -n

記錄檔設定檔的名稱。

--remove

從清單中移除屬性或專案。 範例:--remove property.list OR --remove 屬性ToRemove。

--service-bus-rule-id

您想要在其中建立事件中樞以串流活動記錄的服務匯流排命名空間服務匯流排規則識別碼。 規則識別碼的格式為:'{服務匯流排資源識別碼}/authorizationrules/{key name}'。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=。

--storage-account-id

您要傳送活動記錄的儲存體帳戶資源識別碼。

--subscription

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

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 '' 清除現有的標記。 支援速記語法、json-file 和 yaml-file。 請嘗試 「??」 以顯示更多。

全域參數
--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 來取得完整偵錯記錄。