Submit-​Azure​Rm​HD​Insight​Script​Action

Submits a new script action to an Azure HDInsight cluster.

Syntax

Submit-AzureRmHDInsightScriptAction
      [-ClusterName] <String>
      [-Name] <String>
      [-Uri] <Uri>
      [-NodeTypes] <RuntimeScriptActionClusterNodeType[]>
      [[-Parameters] <String>]
      [[-ApplicationName] <String>]
      [-PersistOnSuccess]
      [-ResourceGroupName <String>]
      [<CommonParameters>]

Description

The Submit-AzureRmHDInsightScriptAction cmdlet submits a new script action to an Azure HDInsight cluster. Use PersistOnSuccess to have the script action run each time the cluster is scaled up, as long as the script action initially succeeds.

Examples

Example 1: Submit a new script action to a running HDInsight cluster

PS C:\>Submit-AzureRmHDInsightScriptAction `
            -ClusterName "your-hadoop-001" `
            -Name "scriptaction" `
            -Uri "<script action URI>" `
            -NodeTypes Worker -PersistOnSuccess

This command submits a script action to a running HDInsight cluster.

Required Parameters

-ClusterName

Specifies the name of the cluster.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of the script action.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-NodeTypes

Specifies the node types on which to run the script action.

Type:RuntimeScriptActionClusterNodeType[]
Parameter Sets:HeadNode, WorkerNode, ZookeeperNode, EdgeNode
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Uri

Specifies the public URI for the script action (a PowerShell or Bash script).

Type:Uri
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-ApplicationName

Specifies the application name for the script action. When ApplicationName is specified, PersistOnSuccess should be set to False, nodes must contain only edgenode, and script action count should equal 1.

Type:String
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Parameters

Specifies the parameters for the script action.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PersistOnSuccess

Indicates that the script action should run each time the cluster is scaled up. This switch parameter is ignored if the script action initially fails.

Type:SwitchParameter
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False