az monitor app-insights component

注意

此參考是 Azure CLI 應用程式深入解析延伸模組的一部分(2.55.0 版或更高版本)。 擴充功能會在您第一次執行 az monitor app-insights 元件 命令時自動安裝。 深入了解擴充功能。

管理 Application Insights 元件或其子元件。

命令

名稱 Description 類型 狀態
az monitor app-insights component billing

管理 Application Insights 元件計費功能。

副檔名 GA
az monitor app-insights component billing show

顯示 Application Insights 資源的計費功能。

副檔名 GA
az monitor app-insights component billing update

更新 Application Insights 資源的計費功能。

副檔名 GA
az monitor app-insights component connect-function

連線 AI 至 Azure 函式。

副檔名 GA
az monitor app-insights component connect-webapp

連線 AI 至 Web 應用程式。

副檔名 GA
az monitor app-insights component continues-export

管理 Application Insights 元件的連續匯出組態。

副檔名 GA
az monitor app-insights component continues-export create

建立 Application Insights 元件的連續匯出組態。

副檔名 GA
az monitor app-insights component continues-export delete

刪除 Application Insights 元件的特定連續匯出組態。

副檔名 GA
az monitor app-insights component continues-export list

列出 Application Insights 元件的連續匯出組態清單。

副檔名 GA
az monitor app-insights component continues-export show

取得此匯出標識碼的連續匯出組態。

副檔名 GA
az monitor app-insights component continues-export update

更新 Application Insights 元件的連續匯出組態。

副檔名 GA
az monitor app-insights component create

建立新的 Application Insights 資源。

副檔名 GA
az monitor app-insights component delete

刪除新的 Application Insights 資源。

副檔名 GA
az monitor app-insights component favorite

管理元件我的最愛。

副檔名 GA
az monitor app-insights component favorite create

建立 Application Insights 元件的新我的最愛。

副檔名 GA
az monitor app-insights component favorite delete

刪除與 Application Insights 元件相關聯的我的最愛。

副檔名 GA
az monitor app-insights component favorite list

列出 Application Insights 元件內定義的我的最愛清單。

副檔名 GA
az monitor app-insights component favorite show

依其 FavoriteId 取得單一我的最愛,其定義於 Application Insights 元件內。

副檔名 GA
az monitor app-insights component favorite update

將新的我的最愛更新為 Application Insights 元件。

副檔名 GA
az monitor app-insights component linked-storage

管理 Application Insights 元件的連結記憶體帳戶。

副檔名 GA
az monitor app-insights component linked-storage link

鏈接記憶體帳戶與 Application Insights 元件。

副檔名 GA
az monitor app-insights component linked-storage show

取得 Application Insights 元件目前的鏈接記憶體設定。

副檔名 GA
az monitor app-insights component linked-storage unlink

將記憶體帳戶與 Application Insights 元件取消連結。

副檔名 GA
az monitor app-insights component linked-storage update

更新 Application Insights 元件目前的連結記憶體帳戶。

副檔名 GA
az monitor app-insights component quotastatus

管理元件 quotastatus。

副檔名 GA
az monitor app-insights component quotastatus show

顯示 Application Insights 元件的每日數據量上限(配額)狀態。

副檔名 GA
az monitor app-insights component show

取得 Application Insights 資源。

副檔名 GA
az monitor app-insights component update

更新現有 Application Insights 資源的屬性。 可更新的主要值是種類,可自定義UI體驗。

副檔名 GA
az monitor app-insights component update-tags

更新現有 Application Insights 資源上的標籤。

副檔名 GA

az monitor app-insights component connect-function

連線 AI 至 Azure 函式。

az monitor app-insights component connect-function --function
                                                   [--app]
                                                   [--ids]
                                                   [--resource-group]
                                                   [--subscription]

範例

連線 AI 至 Azure 函式。

az monitor app-insights component connect-function -g myRG -a myAI --function myFunction

使用資源標識碼將 AI 連線 至 Azure 函式。

az monitor app-insights component connect-function -g myRG -a myAI --function /subscriptions/mySub/resourceGroups/myRG/providers/Microsoft.Web/sites/myFunction

必要參數

--function

Azure 函式的名稱或資源識別碼。

選擇性參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源上的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--ids

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

--resource-group -g

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

--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 app-insights component connect-webapp

連線 AI 至 Web 應用程式。

az monitor app-insights component connect-webapp --web-app
                                                 [--app]
                                                 [--enable-debugger {false, true}]
                                                 [--enable-profiler {false, true}]
                                                 [--ids]
                                                 [--resource-group]
                                                 [--subscription]

範例

連線 AI 到 Web 應用程式,並為 Web 應用程式啟用分析工具和快照調試程式。

az monitor app-insights component connect-webapp -g myRG -a myAI --web-app myApp --enable-profiler --enable-snapshot-debugger

使用資源標識碼將 AI 連線 至 Web 應用程式,並啟用分析工具,並停用 Web 應用程式的快照調試程式。

az monitor app-insights component connect-webapp -g myRG -a myAI --web-app /subscriptions/mySub/resourceGroups/myRG/providers/Microsoft.Web/sites/myApp --enable-profiler --enable-snapshot-debugger false

必要參數

--web-app

Web 應用程式的名稱或資源識別碼。

選擇性參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源上的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--enable-debugger --enable-snapshot-debugger

擲回例外狀況時啟用快照調試程式。 目前僅支援 .NET/.NET Core Web Apps。

接受的值: false, true
--enable-profiler

啟用收集分析追蹤,協助您查看程式代碼中花費的時間。 目前僅支援 .NET/.NET Core Web Apps。

接受的值: false, true
--ids

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

--resource-group -g

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

--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 app-insights component create

建立新的 Application Insights 資源。

az monitor app-insights component create --app
                                         --location
                                         --resource-group
                                         [--application-type]
                                         [--ingestion-access {Disabled, Enabled}]
                                         [--kind]
                                         [--query-access {Disabled, Enabled}]
                                         [--retention-time]
                                         [--tags]
                                         [--workspace]

範例

建立具有種類 Web 和位置的元件。

az monitor app-insights component create --app demoApp --location westus2 --kind web -g demoRg --application-type web --retention-time 120

必要參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--location -l

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

--resource-group -g

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

選擇性參數

--application-type

要監視的應用程式類型。 可能的值包括 『web』、『other』。 預設值為 'web' 。

預設值: web
--ingestion-access

用於存取 Application Insights 擷取的公用網路存取類型。

接受的值: Disabled, Enabled
--kind -k

此元件所參考的應用程式類型,用來自定義UI。 這個值是手繪多邊形字串,值通常應該是其中一個Web、ios、其他、store、java、phone。

預設值: web
--query-access

用於存取 Application Insights 查詢的公用網路存取類型。

接受的值: Disabled, Enabled
--retention-time

Application Insights 的保留天數。 此值可以是下列其中一個值:30,60,90,120,180,270,365,550,730。 只有當 Application Insights 未連線到 Log Analytics 工作區時,才能進行設定。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--workspace

記錄分析工作區的名稱或資源識別碼。

全域參數
--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 app-insights component delete

刪除新的 Application Insights 資源。

az monitor app-insights component delete [--app]
                                         [--ids]
                                         [--resource-group]
                                         [--subscription]

範例

刪除具有種類 Web 和位置的元件。

az monitor app-insights component delete --app demoApp -g demoRg

選擇性參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源上的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--ids

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

--resource-group -g

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

--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 app-insights component show

取得 Application Insights 資源。

az monitor app-insights component show [--app]
                                       [--ids]
                                       [--resource-group]
                                       [--subscription]

範例

依名稱取得元件。

az monitor app-insights component show --app demoApp -g demoRg

列出資源群組中的元件。

az monitor app-insights component show -g demoRg

列出目前所選訂用帳戶中的元件。

az monitor app-insights component show

選擇性參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--ids

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

--resource-group -g

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

--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 app-insights component update

更新現有 Application Insights 資源的屬性。 可更新的主要值是種類,可自定義UI體驗。

az monitor app-insights component update [--app]
                                         [--ids]
                                         [--ingestion-access {Disabled, Enabled}]
                                         [--kind]
                                         [--query-access {Disabled, Enabled}]
                                         [--resource-group]
                                         [--retention-time]
                                         [--subscription]
                                         [--workspace]

範例

使用種類 Web 更新元件。

az monitor app-insights component update --app demoApp -k web -g demoRg --retention-time 120

選擇性參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源上的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--ids

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

--ingestion-access

用於存取 Application Insights 擷取的公用網路存取類型。

接受的值: Disabled, Enabled
--kind -k

此元件所參考的應用程式類型,用來自定義UI。 這個值是手繪多邊形字串,值通常應該是其中一個Web、ios、其他、store、java、phone。

--query-access

用於存取 Application Insights 查詢的公用網路存取類型。

接受的值: Disabled, Enabled
--resource-group -g

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

--retention-time

Application Insights 的保留天數。 此值可以是下列其中一個值:30,60,90,120,180,270,365,550,730。 只有當 Application Insights 未連線到 Log Analytics 工作區時,才能進行設定。

--subscription

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

--workspace

記錄分析工作區的名稱或資源識別碼。

全域參數
--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 app-insights component update-tags

更新現有 Application Insights 資源上的標籤。

az monitor app-insights component update-tags --tags
                                              [--app]
                                              [--ids]
                                              [--resource-group]
                                              [--subscription]

範例

將標記 『name』 更新為等於 『value』。

az monitor app-insights component update-tags --app demoApp --tags name=value -g demoRg

必要參數

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

選擇性參數

--app -a

Application Insights 元件的 GUID、應用程式名稱或完整 Azure 資源名稱。 您可以從 Azure 入口網站 中任何 Application Insights 資源的 API 存取功能表項取得應用程式 GUID。 如果使用應用程式名稱,請指定資源群組。

--ids

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

--resource-group -g

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

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