az hdinsight script-action

Manage HDInsight script actions.

Commands

az hdinsight script-action delete

Deletes a specified persisted script action of the cluster.

az hdinsight script-action execute

Execute script actions on the specified HDInsight cluster.

az hdinsight script-action list

Lists all the persisted script actions for the specified cluster.

az hdinsight script-action list-execution-history

Lists all scripts' execution history for the specified cluster.

az hdinsight script-action promote

Promotes the specified ad-hoc script execution to a persisted script.

az hdinsight script-action show-execution-details

Gets the script execution detail for the given script execution ID.

az hdinsight script-action delete

Deletes a specified persisted script action of the cluster.

az hdinsight script-action delete --cluster-name
                                  --name
                                  --resource-group
                                  [--subscription]

Required Parameters

--cluster-name

The name of the cluster.

--name -n

The name of the script.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az hdinsight script-action execute

Execute script actions on the specified HDInsight cluster.

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

Examples

Execute a script action and persist on success.

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

Required Parameters

--cluster-name

The name of the cluster.

--name -n

The name of the script action.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--roles

A space-delimited list of roles (nodes) where the script will be executed. Valid roles are headnode, workernode, zookeepernode, edgenode.

--script-uri

The URI to the script.

Optional Parameters

--persist-on-success

If the scripts needs to be persisted.

--script-parameters

The parameters for the script.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az hdinsight script-action list

Lists all the persisted script actions for the specified cluster.

az hdinsight script-action list --cluster-name
                                --resource-group
                                [--query-examples]
                                [--subscription]

Required Parameters

--cluster-name

The name of the cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az hdinsight script-action list-execution-history

Lists all scripts' execution history for the specified cluster.

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

Required Parameters

--cluster-name

The name of the cluster.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az hdinsight script-action promote

Promotes the specified ad-hoc script execution to a persisted script.

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

Required Parameters

--cluster-name

The name of the cluster.

--execution-id

The script execution id.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az hdinsight script-action show-execution-details

Gets the script execution detail for the given script execution ID.

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

Required Parameters

--cluster-name

The name of the cluster.

--execution-id

The script execution id.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.