Add-AzHDInsightClusterIdentity

Menambahkan identitas kluster ke objek konfigurasi kluster.

Sintaks

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>]

Deskripsi

Cmdlet Add-AzHDInsightClusterIdentity menambahkan identitas kluster ke objek konfigurasi Azure HDInsight yang dibuat oleh cmdlet New-AzHDInsightClusterConfig.

Contoh

Contoh 1: Menambahkan info Identitas Kluster ke objek konfigurasi kluster

# 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

Perintah ini menambahkan info Identitas Kluster ke kluster bernama your-hadoop-001, yang memungkinkan kluster mengakses Azure Data Lake Store.

Parameter

-AadTenantId

Menentukan ID penyewa Microsoft Entra yang akan digunakan saat mengakses Azure Data Lake Store.

Type:Guid
Position:4
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationId

Id Aplikasi Perwakilan Layanan untuk mengakses Azure Data Lake.

Type:Guid
Position:5
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CertificateFileContents

Menentukan konten file sertifikat yang akan digunakan saat mengakses Azure Data Lake Store.

Type:Byte[]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-CertificateFilePath

Menentukan jalur file ke sertifikat yang akan digunakan untuk mengautentikasi sebagai Perwakilan Layanan. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.

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

-CertificatePassword

Menentukan kata sandi untuk sertifikat yang akan digunakan untuk mengautentikasi sebagai Perwakilan Layanan. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.

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

-Config

Menentukan objek konfigurasi kluster HDInsight yang dimodifikasi cmdlet ini. Objek ini dibuat oleh cmdlet New-AzHDInsightClusterConfig.

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

-DefaultProfile

Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan azure

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

-ObjectId

Menentukan ID objek Microsoft Entra (GUID) dari perwakilan layanan Microsoft Entra yang mewakili kluster. Kluster akan menggunakan ini saat mengakses Azure Data Lake Store.

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

Input

AzureHDInsightConfig

Guid

Output

AzureHDInsightConfig