共用方式為


az cli-translator arm

備註

此參考是 Azure CLI 的 cli-translator 延伸模組的一部分(2.13.0 版或更高版本)。 擴充功能會在您第一次執行 az cli-translator arm 命令時自動安裝深入瞭解擴充功能

命令群組 『cli-translator』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將 ARM 樣本轉譯為 CLI 腳本(目前僅支援計算、網路和記憶體)。

命令

名稱 Description 類型 狀態
az cli-translator arm translate

將 ARM 樣本轉譯為 CLI 腳本(目前僅支援計算、網路和記憶體)。

擴充套件 實驗性的

az cli-translator arm translate

實驗

命令群組 『cli-translator』 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將 ARM 樣本轉譯為 CLI 腳本(目前僅支援計算、網路和記憶體)。

az cli-translator arm translate --parameters
                                --resource-group
                                --template
                                [--target-subscription]

範例

將 ARM template.json 和 parameters.json 轉譯為 CLI 腳稿

az cli-translator arm translate --target-subscription 00000000-0000-0000-0000-000000000000 --resource-group groupName --template /path/to/local/template --parameters /path/to/local/parameters

必要參數

--parameters

parameters.json 檔案的本機路徑或URL。

--resource-group -g

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

--template

template.json 檔案的本機路徑或URL。

選擇性參數

--target-subscription

目標訂用帳戶標識碼。如果省略,則會使用目前的訂用帳戶標識碼。

全域參數
--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。