你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Add-AzHDInsightClusterIdentity
将群集标识添加到群集配置对象。
语法
Add-AzHDInsightClusterIdentity
[-Config] <AzureHDInsightConfig>
[-ObjectId] <Guid>
[-CertificateFilePath] <String>
[-CertificatePassword] <String>
[[-AadTenantId] <Guid>]
[[-ApplicationId] <Guid>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Add-AzHDInsightClusterIdentity
[-Config] <AzureHDInsightConfig>
[-ObjectId] <Guid>
[-CertificateFileContents] <Byte[]>
[-CertificatePassword] <String>
[[-AadTenantId] <Guid>]
[[-ApplicationId] <Guid>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Add-AzHDInsightClusterIdentity cmdlet 将群集标识添加到 New-AzHDInsightClusterConfig cmdlet 创建的 Azure HDInsight 配置对象。
示例
示例 1:将群集标识信息添加到群集配置对象
# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageacct001"
$storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
$storageContainer = "container001"
# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location
# Cluster Identity values
$tenantId = (Get-AzContext).Tenant.TenantId
$objectId = "<Azure AD Service Principal Object ID>"
$applicationId = "<Azure AD Service Principal Application ID>"
$certificateFilePath = "<Path to Azure AD Service Principal Certificate>"
$certificatePassword = "<Password for Azure AD Service Principal Certificate>"
# Create the cluster
New-AzHDInsightClusterConfig `
| Add-AzHDInsightClusterIdentity `
-AadTenantId $tenantId `
-ObjectId $objectId `
-ApplicationId $applicationId `
-CertificateFilePath $certificateFilePath `
-CertificatePassword $certificatePassword `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Linux `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-StorageAccountResourceId $storageAccountResourceId `
-StorageAccountKey $storageAccountKey `
-StorageContainer $storageAccountContainer
此命令将群集标识信息添加到名为 your-hadoop-001 的群集,允许群集访问 Azure Data Lake Store。
参数
-AadTenantId
指定访问 Azure Data Lake Store 时将使用的 Microsoft Entra 租户 ID。
Type: | Guid |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ApplicationId
用于访问 Azure Data Lake 的服务主体应用程序 ID。
Type: | Guid |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CertificateFileContents
指定访问 Azure Data Lake Store 时将使用的证书的文件内容。
Type: | Byte[] |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CertificateFilePath
指定将用于作为服务主体进行身份验证的证书的文件路径。 访问 Azure Data Lake Store 时,群集将使用此群集。
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CertificatePassword
指定将用于作为服务主体进行身份验证的证书的密码。 访问 Azure Data Lake Store 时,群集将使用此群集。
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Config
指定此 cmdlet 修改的 HDInsight 群集配置对象。 此对象由 New-AzHDInsightClusterConfig cmdlet 创建。
Type: | AzureHDInsightConfig |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ObjectId
指定表示群集的 Microsoft Entra 服务主体的 Microsoft Entra 对象 ID(GUID)。 访问 Azure Data Lake Store 时,群集将使用此群集。
Type: | Guid |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输入
输出
相关链接
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈