az kusto script
Note
此參考是 Azure CLI 的 kusto 延伸模組的一部分(2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az kusto script 命令時自動安裝。 深入了解擴充功能。
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
使用 kusto 管理腳本。
命令
| 名稱 | Description | 類型 | 狀態 |
|---|---|---|---|
| az kusto script create |
建立 Kusto 資料庫文本。 |
Extension | Experimental |
| az kusto script delete |
刪除 Kusto principalAssignment。 |
Extension | Experimental |
| az kusto script list |
傳回指定資料庫的資料庫文本清單。 |
Extension | Experimental |
| az kusto script show |
取得 Kusto 叢集資料庫腳本。 |
Extension | Experimental |
| az kusto script update |
更新資料庫文本。 |
Extension | Experimental |
| az kusto script wait |
將 CLI 置於等候狀態,直到符合 kusto 腳本的條件為止。 |
Extension | Experimental |
az kusto script create
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
建立 Kusto 資料庫文本。
az kusto script create --cluster-name
--database-name
--name --script-name
--resource-group
[--continue-on-errors {false, true}]
[--force-update-tag]
[--no-wait]
[--script-content]
[--script-url]
[--script-url-sas-token]
範例
KustoScriptsCreateOrUpdate
az kusto script create --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --continue-on-errors true --force-update-tag "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe" --script-url "https://mysa.blob.core.windows.net/container/script.txt" --script-url-sas-token "?sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=********************************" --resource-group "kustorptest" --name "kustoScript1"
必要參數
Kusto 叢集的名稱。
Kusto 叢集中的資料庫名稱。
Kusto 資料庫文本的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
指出如果其中一個命令失敗,是否要繼續的旗標。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
唯一字串。 如果已變更,腳本將會再次套用。
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
腳本內容。 當腳本提供內嵌而非透過 SA 中的檔案時,應該使用這個屬性。 不得與 scriptUrl 和 scriptUrlSasToken 屬性搭配使用。
KQL 腳本 Blob 檔案的 URL。 不得與 scriptContent 屬性搭配使用。
提供包含文稿之檔案讀取許可權的 SaS 令牌。 使用 scriptUrl 屬性時必須提供。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az kusto script delete
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
刪除 Kusto principalAssignment。
az kusto script delete [--cluster-name]
[--database-name]
[--ids]
[--name --script-name]
[--no-wait]
[--resource-group]
[--subscription]
[--yes]
範例
KustoScriptsDelete
az kusto script delete --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --resource-group "kustorptest" --name "kustoScript1"
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
Kusto 叢集的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Kusto 叢集中的資料庫名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Kusto 資料庫文本的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿提示確認。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az kusto script list
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
傳回指定資料庫的資料庫文本清單。
az kusto script list --cluster-name
--database-name
--resource-group
範例
KustoScriptsList
az kusto script list --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest"
必要參數
Kusto 叢集的名稱。
Kusto 叢集中的資料庫名稱。
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az kusto script show
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
取得 Kusto 叢集資料庫腳本。
az kusto script show [--cluster-name]
[--database-name]
[--ids]
[--name --script-name]
[--resource-group]
[--subscription]
範例
KustoScriptsGet
az kusto script show --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1"
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
Kusto 叢集的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Kusto 叢集中的資料庫名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Kusto 資料庫文本的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az kusto script update
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
更新資料庫文本。
az kusto script update [--cluster-name]
[--continue-on-errors {false, true}]
[--database-name]
[--force-update-tag]
[--ids]
[--name --script-name]
[--no-wait]
[--resource-group]
[--script-content]
[--script-url]
[--script-url-sas-token]
[--subscription]
範例
KustoScriptsUpdate
az kusto script update --cluster-name "kustoclusterrptest4" --database-name "KustoDatabase8" --continue-on-errors true --force-update-tag "2bcf3c21-ffd1-4444-b9dd-e52e00ee53fe" --script-url "https://mysa.blob.core.windows.net/container/script.txt" --script-url-sas-token "?sv=2019-02-02&st=2019-04-29T22%3A18%3A26Z&se=2019-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=********************************" --resource-group "kustorptest" --name "kustoScript1"
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
Kusto 叢集的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
指出如果其中一個命令失敗,是否要繼續的旗標。
| 屬性 | 值 |
|---|---|
| 接受的值: | false, true |
Kusto 叢集中的資料庫名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
唯一字串。 如果已變更,腳本將會再次套用。
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
Kusto 資料庫文本的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請勿等候長時間執行的作業完成。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
腳本內容。 當腳本提供內嵌而非透過 SA 中的檔案時,應該使用這個屬性。 不得與 scriptUrl 和 scriptUrlSasToken 屬性搭配使用。
KQL 腳本 Blob 檔案的 URL。 不得與 scriptContent 屬性搭配使用。
提供包含文稿之檔案讀取許可權的 SaS 令牌。 使用 scriptUrl 屬性時必須提供。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
az kusto script wait
命令群組 『kusto』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus
將 CLI 置於等候狀態,直到符合 kusto 腳本的條件為止。
az kusto script wait [--cluster-name]
[--created]
[--custom]
[--database-name]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name --script-name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
範例
暫停執行下一行 CLI 腳本,直到成功建立 kusto 腳本為止。
az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --created
暫停執行下一行 CLI 腳本,直到 kusto 腳本成功更新為止。
az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --updated
暫停執行下一行 CLI 腳本,直到成功刪除 kusto 腳本為止。
az kusto script wait --cluster-name "kustoclusterrptest4" --database-name "Kustodatabase8" --resource-group "kustorptest" --name "kustoScript1" --deleted
選擇性參數
下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。
Kusto 叢集的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
請等候在 'Succeeded' 使用 'provisioningState' 建立。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等到條件符合自定義 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
Kusto 叢集中的資料庫名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
等到刪除為止。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
等候資源存在。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
一或多個資源識別碼(以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
輪詢間隔以秒為單位。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 30 |
Kusto 資料庫文本的名稱。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。
| 屬性 | 值 |
|---|---|
| 參數群組: | Resource Id Arguments |
以秒為單位的等候上限。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | 3600 |
等到 provisioningState 更新為 'Succeeded'。
| 屬性 | 值 |
|---|---|
| 參數群組: | Wait Condition Arguments |
| 預設值: | False |
全域參數
提高日誌詳細程度以顯示所有調試日誌。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
| 屬性 | 值 |
|---|---|
| 預設值: | False |
輸出格式。
| 屬性 | 值 |
|---|---|
| 預設值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
| 屬性 | 值 |
|---|---|
| 預設值: | False |