Bearbeiten

Freigeben über


Submit-AzHDInsightScriptAction

Submits a new script action to an Azure HDInsight cluster.

Syntax

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

Description

The Submit-AzHDInsightScriptAction 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

Submit-AzHDInsightScriptAction `
            -ClusterName "your-hadoop-001" `
            -Name "scriptaction" `
            -Uri "<script action URI>" `
            -NodeTypes Worker -PersistOnSuccess

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

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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ClusterName

Specifies the name of the cluster.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the script action.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NodeTypes

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

Type:RuntimeScriptActionClusterNodeType[]
Accepted values:HeadNode, WorkerNode, ZookeeperNode, EdgeNode
Position:3
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Parameters

Specifies the parameters for the script action.

Type:String
Position:4
Default value:None
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specifies the name of the resource group.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Uri

RuntimeScriptActionClusterNodeType[]

Outputs

AzureHDInsightRuntimeScriptActionOperationResource