az automation configuration
注意
此參考是 Azure CLI 自動化延伸模組的一部分(2.55.0 版或更高版本)。 擴充功能會在您第一次執行 az automation configuration 命令時自動安裝。 深入了解擴充功能。
管理 Dsc 組態。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az automation configuration create |
建立組態名稱所識別的組態。 |
副檔名 | GA |
az automation configuration delete |
刪除組態名稱所識別的 dsc 組態。 |
副檔名 | GA |
az automation configuration list |
列出組態清單。 |
副檔名 | GA |
az automation configuration show |
取得組態名稱所識別的組態。 |
副檔名 | GA |
az automation configuration show-content |
取得組態名稱所識別的組態腳本。 |
副檔名 | GA |
az automation configuration update |
更新組態名稱所識別的組態。 |
副檔名 | GA |
az automation configuration create
建立組態名稱所識別的組態。
az automation configuration create --account
--configuration-name
--resource-group
[--description]
[--location]
[--log-progress {0, 1, f, false, n, no, t, true, y, yes}]
[--log-verbose {0, 1, f, false, n, no, t, true, y, yes}]
[--parameters]
[--source]
[--source-hash]
[--source-type {embeddedContent, uri}]
[--source-version]
[--tags]
範例
建立設定伺服器的 DSC 組態
az automation configuration create -g rg --automation-account-name myAutomationAccount -n SetupServer --location westus2 --source-type embeddedContent --source "Configuration SetupServer {
Node localhost {
WindowsFeature IIS {
Name = "Web-Server";
Ensure = "Present"
}
}
}"
必要參數
自動化帳戶的名稱。
設定的建立或更新參數。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
選擇性參數
取得或設定組態的描述。
取得或設定資源的位置。
取得或設定進度記錄選項。
取得或設定詳細信息記錄選項。
取得或設定組態參數。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
取得或設定內容的值。 這是根據內容類型。
取得或設定哈希。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
取得或設定內容類型。
取得或設定內容的版本。
取得或設定附加至資源的標記。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az automation configuration delete
刪除組態名稱所識別的 dsc 組態。
az automation configuration delete [--account]
[--configuration-name]
[--ids]
[--resource-group]
[--subscription]
[--yes]
範例
刪除 DSC 組態
az automation configuration list -g rg --automation-account-name myAutomationAccount
選擇性參數
自動化帳戶的名稱。
組態名稱。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
不提示確認。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az automation configuration list
列出組態清單。
az automation configuration list --account
--resource-group
[--filter]
[--inlinecount]
[--max-items]
[--next-token]
[--skip]
[--top]
範例
列出所有 DSC 組態
az automation configuration list -g rg --automation-account-name myAutomationAccount
必要參數
自動化帳戶的名稱。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
選擇性參數
要套用至作業的篩選條件。
傳回總計數據列。
命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的自變數中 --next-token
提供令牌值。
標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。
要略過的列數。
要接受的數據列數目。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az automation configuration show
取得組態名稱所識別的組態。
az automation configuration show [--account]
[--configuration-name]
[--ids]
[--resource-group]
[--subscription]
範例
依其名稱取得組態
az automation configuration show -g rg --automation-account-name myAutomationAccount -n SetupServer
選擇性參數
自動化帳戶的名稱。
組態名稱。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az automation configuration show-content
取得組態名稱所識別的組態腳本。
az automation configuration show-content [--account]
[--configuration-name]
[--ids]
[--resource-group]
[--subscription]
範例
顯示 DSC 組態的文稿內容
az automation configuration show-content -g rg --automation-account-name myAutomationAccount -n SetupServer
選擇性參數
自動化帳戶的名稱。
組態名稱。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。
az automation configuration update
更新組態名稱所識別的組態。
az automation configuration update [--account]
[--add]
[--configuration-name]
[--description]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--location]
[--log-progress {0, 1, f, false, n, no, t, true, y, yes}]
[--log-verbose {0, 1, f, false, n, no, t, true, y, yes}]
[--parameters]
[--remove]
[--resource-group]
[--set]
[--source]
[--source-hash]
[--source-type {embeddedContent, uri}]
[--source-version]
[--subscription]
[--tags]
範例
更新 DSC 組態中的腳本
az automation configuration update -g rg --automation-account-name myAutomationAccount -n SetupServer --location westus2 --source-type embeddedContent --source "Configuration SetupServer {
Node localhostServer {
WindowsFeature IIS {
Name = "Web-Server";
Ensure = "Present"
}
}
}"
選擇性參數
自動化帳戶的名稱。
藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value、string 或 JSON 字串>。
組態名稱。
取得或設定組態的描述。
使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。
一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。
取得或設定資源的位置。
取得或設定進度記錄選項。
取得或設定詳細信息記錄選項。
取得或設定組態參數。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
從清單中移除屬性或專案。 範例:--remove property.list OR --remove 屬性ToRemove。
資源群組的名稱。 您可以使用 來設定預設群組 az configure --defaults group=<name>
。
指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=。
取得或設定內容的值。 這是根據內容類型。
取得或設定哈希。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
取得或設定內容類型。
取得或設定內容的版本。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
取得或設定附加至資源的標記。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。
全域參數
增加記錄詳細資訊,以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID
帳戶。
增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。