Edit

Share via


Set-AzHDInsightGatewayCredential

Sets the gateway HTTP credentials of an Azure HDInsight cluster.

Syntax

SetByNameParameterSet (Default)

Set-AzHDInsightGatewayCredential
    [-Name] <String>
    [-HttpCredential] <PSCredential>
    [-ResourceGroupName <String>]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetByInputObjectParameterSet

Set-AzHDInsightGatewayCredential
    [-HttpCredential] <PSCredential>
    -InputObject <AzureHDInsightCluster>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetByResourceIdParameterSet

Set-AzHDInsightGatewayCredential
    [-HttpCredential] <PSCredential>
    -ResourceId <String>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AzHDInsightGatewayCredential cmdlet sets gateway credential of an Azure HDInsight cluster.

Examples

Example 1

# Cluster info
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

Set-AzHDInsightGatewayCredential `
            -ClusterName $clusterName `
            -HttpCredential $clusterCreds

This command sets gateway credential of the cluster named your-hadoop-001 by name parameter set.

Example 2

Set-AzHDInsightGatewayCredential `
            -ResourceId "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/your-hadoop-001" `
            -HttpCredential $clusterCreds

This command sets gateway credential of the cluster named your-hadoop-001 by ResourceId parameter set.

Example 3

# Cluster info
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

Get-AzHDInsightCluster -ClusterName $clusterName | Set-AzHDInsightGatewayCredential `
            -HttpCredential $clusterCreds

This command sets gateway credential of the cluster named your-hadoop-001 by InputObject parameter set.

Parameters

-AsJob

Run cmdlet in the background.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpCredential

Gets or sets the login for the cluster's user.

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-InputObject

Gets or sets the input object.

Parameter properties

Type:AzureHDInsightCluster
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Gets or sets the name of the cluster.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ClusterName

Parameter sets

SetByNameParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Gets or sets the name of the resource group.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByNameParameterSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

Gets or sets the resource id.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

AzureHDInsightGatewaySettings