Share via


az hdinsight script-action

管理 HDInsight 腳本動作。

命令

名稱 Description 類型 狀態
az hdinsight script-action delete

刪除叢集的指定保存腳本動作。

核心 GA
az hdinsight script-action execute

在指定的 HDInsight 叢集上執行腳本動作。

核心 GA
az hdinsight script-action list

列出指定叢集的所有保存腳本動作。

核心 GA
az hdinsight script-action list-execution-history

列出指定叢集的所有腳本執行歷程記錄。

核心 GA
az hdinsight script-action promote

將指定的臨機操作腳本執行升階為保存的腳本。

核心 GA
az hdinsight script-action show-execution-details

取得指定腳本執行識別碼的腳本執行詳細資料。

核心 GA

az hdinsight script-action delete

刪除叢集的指定保存腳本動作。

az hdinsight script-action delete --cluster-name
                                  --name
                                  --resource-group

必要參數

--cluster-name

叢集的名稱。

--name -n

腳本的名稱。

--resource-group -g

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

全域參數
--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 hdinsight script-action execute

在指定的 HDInsight 叢集上執行腳本動作。

az hdinsight script-action execute --cluster-name
                                   --name
                                   --resource-group
                                   --roles
                                   --script-uri
                                   [--persist-on-success]
                                   [--script-parameters]

範例

執行腳本動作,並在成功時保存。

az hdinsight script-action execute -g MyResourceGroup -n MyScriptActionName \
--cluster-name MyCluster \
--script-uri https://hdiconfigactions.blob.core.windows.net/linuxgiraphconfigactionv01/giraph-installer-v01.sh \
--roles headnode workernode \
--persist-on-success

必要參數

--cluster-name

叢集的名稱。

--name -n

腳本動作的名稱。

--resource-group -g

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

--roles

將執行腳本的角色(節點)以空格分隔的清單。 有效角色為 headnode、workernode、zookeepernode、edgenode。

--script-uri

腳本的 URI。

選擇性參數

--persist-on-success

如果需要保存腳本。

預設值: False
--script-parameters

腳本的參數。

全域參數
--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 hdinsight script-action list

列出指定叢集的所有保存腳本動作。

az hdinsight script-action list --cluster-name
                                --resource-group

必要參數

--cluster-name

叢集的名稱。

--resource-group -g

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

全域參數
--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 hdinsight script-action list-execution-history

列出指定叢集的所有腳本執行歷程記錄。

az hdinsight script-action list-execution-history --cluster-name
                                                  --resource-group

必要參數

--cluster-name

叢集的名稱。

--resource-group -g

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

全域參數
--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 hdinsight script-action promote

將指定的臨機操作腳本執行升階為保存的腳本。

az hdinsight script-action promote --cluster-name
                                   --execution-id
                                   --resource-group

必要參數

--cluster-name

叢集的名稱。

--execution-id

腳本執行識別碼。

--resource-group -g

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

全域參數
--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 hdinsight script-action show-execution-details

取得指定腳本執行識別碼的腳本執行詳細資料。

az hdinsight script-action show-execution-details --cluster-name
                                                  --execution-id
                                                  --resource-group

必要參數

--cluster-name

叢集的名稱。

--execution-id

腳本執行識別碼。

--resource-group -g

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

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