共用方式為


az deployment-scripts

管理訂用帳戶或資源群組範圍的部署腳本。

命令

名稱 Description 類型 狀態
az deployment-scripts delete

刪除部署腳本。

Core GA
az deployment-scripts list

列出所有部署腳本。

Core GA
az deployment-scripts show

擷取部署腳本。

Core GA
az deployment-scripts show-log

顯示部署腳本記錄。

Core GA

az deployment-scripts delete

刪除部署腳本。

az deployment-scripts delete --name
                             --resource-group
                             [--yes]

範例

刪除使用者登入預設訂用帳戶中找到的部署腳本。

az deployment-scripts delete --resource-group contoso-rg --name contosoBashScript

必要參數

--name

部署文本資源名稱。

--resource-group -g

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--yes -y

請勿提示確認。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az deployment-scripts list

列出所有部署腳本。

az deployment-scripts list [--resource-group]

範例

擷取使用者登入預設訂用帳戶中找到的所有部署腳本。

az deployment-scripts list

擷取資源群組中找到的所有部署腳本

az deployment-scripts list --resource-group contoso-rg

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az deployment-scripts show

擷取部署腳本。

az deployment-scripts show --name
                           --resource-group

範例

擷取使用者登入預設訂用帳戶中找到的部署腳本。

az deployment-scripts show --resource-group contoso-rg --name contosoBashScript

必要參數

--name

部署文本資源名稱。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az deployment-scripts show-log

顯示部署腳本記錄。

az deployment-scripts show-log --name
                               --resource-group

範例

擷取使用者登入預設訂用帳戶中找到的部署腳本記錄,最大限製為4MB。

az deployment-scripts show-log --resource-group contoso-rg --name contosoBashScript

必要參數

--name

部署文本資源名稱。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False