< Back
Add-AzureRmHDInsightClusterIdentity
Post
NAME Add-AzureRmHDInsightClusterIdentity
SYNOPSIS
Adds a cluster identity to a cluster configuration object.
SYNTAX
Add-AzureRmHDInsightClusterIdentity [-Config] <AzureHDInsightConfig> [-ObjectId] <Guid> [-CertificateFileContents] <Byte[]> [-CertificatePassword]
<String> [[-AadTenantId] <Guid>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Add-AzureRmHDInsightClusterIdentity [-Config] <AzureHDInsightConfig> [-ObjectId] <Guid> [-CertificateFilePath] <String> [-CertificatePassword]
<String> [[-AadTenantId] <Guid>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmHDInsightClusterIdentity cmdlet adds a cluster identity to the Azure HDInsight configuration object created by the
New-AzureRmHDInsightClusterConfig cmdlet.
PARAMETERS
-AadTenantId <Guid>
Specifies the Azure AD Tenant ID that will be used when accessing Azure Data Lake Store.
Required? false
Position? 4
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CertificateFileContents <Byte[]>
Specifies file contents of the certificate that will be used when accessing Azure Data Lake Store.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CertificateFilePath <String>
Specifies the file path to the certificate that will be used to authenticate as the Service Principal. The cluster will use this when
accessing Azure Data Lake Store.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CertificatePassword <String>
Specifies the password for the certificate that will be used to authenticate as the Service Principal. The cluster will use this when
accessing Azure Data Lake Store.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Config <AzureHDInsightConfig>
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the
New-AzureRmHDInsightClusterConfig cmdlet.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ObjectId <Guid>
Specifies the Azure AD object ID (a GUID) of the Azure AD Service Principal that represents the cluster. The cluster will use this when
accessing Azure Data Lake Store.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
AzureHDInsightConfig
Parameter 'Config' accepts value of type 'AzureHDInsightConfig' from the pipeline
Guid
Parameter 'ObjectId' accepts value of type 'Guid' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
NOTES
Example 1: Add Cluster Identity info to the cluster configuration object
PS C:\\># Primary storage account info
PS C:\\> $storageAccountResourceGroupName = "Group"
PS C:\\> $storageAccountName = "yourstorageacct001"
PS C:\\> $storageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
PS C:\\> $storageContainer = "container001"
# Cluster configuration info
PS C:\\> $location = "East US 2"
PS C:\\> $clusterResourceGroupName = "Group"
PS C:\\> $clusterName = "your-hadoop-001"
PS C:\\> $clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzureRmResourceGroup -Name $clusterResourceGroupName -Location $location
# Cluster Identity values
PS C:\\> $tenantId = (Get-AzureRmContext).Tenant.TenantId
PS C:\\> $objectId = "<Azure AD Service Principal Object ID>"
PS C:\\> $certificateFilePath = "<Path to Azure AD Service Principal Certificate>"
PS C:\\> $certificatePassword = "<Password for Azure AD Service Principal Certificate>"
# Create the cluster
PS C:\\> New-AzureRmHDInsightClusterConfig `
| Add-AzureRmHDInsightClusterIdentity `
-AadTenantId $tenantId `
-ObjectId $objectId `
-CertificateFilePath $certificateFilePath `
-CertificatePassword $certificatePassword `
| New-AzureRmHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.windows.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageAccountContainer
This command adds Cluster Identity info to the cluster named your-hadoop-001, allowing the cluster to access Azure Data Lake Store.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... eridentity
New-AzureRmHDInsightClusterConfig
SYNOPSIS
Adds a cluster identity to a cluster configuration object.
SYNTAX
Add-AzureRmHDInsightClusterIdentity [-Config] <AzureHDInsightConfig> [-ObjectId] <Guid> [-CertificateFileContents] <Byte[]> [-CertificatePassword]
<String> [[-AadTenantId] <Guid>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Add-AzureRmHDInsightClusterIdentity [-Config] <AzureHDInsightConfig> [-ObjectId] <Guid> [-CertificateFilePath] <String> [-CertificatePassword]
<String> [[-AadTenantId] <Guid>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmHDInsightClusterIdentity cmdlet adds a cluster identity to the Azure HDInsight configuration object created by the
New-AzureRmHDInsightClusterConfig cmdlet.
PARAMETERS
-AadTenantId <Guid>
Specifies the Azure AD Tenant ID that will be used when accessing Azure Data Lake Store.
Required? false
Position? 4
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CertificateFileContents <Byte[]>
Specifies file contents of the certificate that will be used when accessing Azure Data Lake Store.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CertificateFilePath <String>
Specifies the file path to the certificate that will be used to authenticate as the Service Principal. The cluster will use this when
accessing Azure Data Lake Store.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-CertificatePassword <String>
Specifies the password for the certificate that will be used to authenticate as the Service Principal. The cluster will use this when
accessing Azure Data Lake Store.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Config <AzureHDInsightConfig>
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the
New-AzureRmHDInsightClusterConfig cmdlet.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ObjectId <Guid>
Specifies the Azure AD object ID (a GUID) of the Azure AD Service Principal that represents the cluster. The cluster will use this when
accessing Azure Data Lake Store.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
AzureHDInsightConfig
Parameter 'Config' accepts value of type 'AzureHDInsightConfig' from the pipeline
Guid
Parameter 'ObjectId' accepts value of type 'Guid' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
NOTES
Example 1: Add Cluster Identity info to the cluster configuration object
PS C:\\># Primary storage account info
PS C:\\> $storageAccountResourceGroupName = "Group"
PS C:\\> $storageAccountName = "yourstorageacct001"
PS C:\\> $storageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
PS C:\\> $storageContainer = "container001"
# Cluster configuration info
PS C:\\> $location = "East US 2"
PS C:\\> $clusterResourceGroupName = "Group"
PS C:\\> $clusterName = "your-hadoop-001"
PS C:\\> $clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzureRmResourceGroup -Name $clusterResourceGroupName -Location $location
# Cluster Identity values
PS C:\\> $tenantId = (Get-AzureRmContext).Tenant.TenantId
PS C:\\> $objectId = "<Azure AD Service Principal Object ID>"
PS C:\\> $certificateFilePath = "<Path to Azure AD Service Principal Certificate>"
PS C:\\> $certificatePassword = "<Password for Azure AD Service Principal Certificate>"
# Create the cluster
PS C:\\> New-AzureRmHDInsightClusterConfig `
| Add-AzureRmHDInsightClusterIdentity `
-AadTenantId $tenantId `
-ObjectId $objectId `
-CertificateFilePath $certificateFilePath `
-CertificatePassword $certificatePassword `
| New-AzureRmHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.windows.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageAccountContainer
This command adds Cluster Identity info to the cluster named your-hadoop-001, allowing the cluster to access Azure Data Lake Store.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... eridentity
New-AzureRmHDInsightClusterConfig