Add-AzHDInsightSecurityProfile
クラスター構成オブジェクトにセキュリティ プロファイルを追加します。
構文
Add-AzHDInsightSecurityProfile
[-Config] <AzureHDInsightConfig>
-DomainResourceId <String>
-DomainUserCredential <PSCredential>
[-OrganizationalUnitDN <String>]
-LdapsUrls <String[]>
[-ClusterUsersGroupDNs <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
セキュリティ プロファイルは、セキュリティで保護されたクラスターを Kerberizing して作成するために使用されます。 セキュリティ プロファイルには、クラスターの Active Directory ドメインへの参加に関連する構成が含まれています。
例
例 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
#Security profile info
$domain="sampledomain.onmicrosoft.com"
$domainUser="sample.user@sampledomain.onmicrosoft.com"
$domainPassword=ConvertTo-SecureString -String "****" -AsPlainText -Force
$domainUserCredential=New-Object System.Management.Automation.PSCredential($domainUser, $domainPassword)
$organizationalUnitDN="ou=testunitdn"
$ldapsUrls=("ldaps://sampledomain.onmicrosoft.com:636","ldaps://sampledomain.onmicrosoft.com:389")
$clusterUsersGroupDNs=("groupdn1","groupdn2")
# Create the cluster
New-AzHDInsightClusterConfig `
| Add-AzHDInsightSecurityProfile `
-DomainResourceId $domain `
-DomainUserCredential $domainUserCredential `
-OrganizationalUnitDN $organizationalUnitDN `
-LdapsUrls $ldapsUrls `
-ClusterUsersGroupDNs $clusterUsersGroupDNs `
| New-AzHDInsightCluster `
-ClusterType Spark `
-OSType Linux `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-StorageAccountResourceId $storageAccountResourceId `
-StorageAccountKey $storageAccountKey `
-StorageContainer $storageContainer
このコマンドは、your-hadoop-001 という名前のクラスターにセキュリティ プロファイル値を追加します。
パラメーター
-ClusterUsersGroupDNs
Ambari と Ranger で使用できる Active Directory グループの識別名
型: | String[] |
配置: | Named |
規定値: | None |
必須: | False |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-Config
このコマンドレットが変更する HDInsight クラスター構成オブジェクトを指定します。 このオブジェクトは、New-AzHDInsightClusterConfig コマンドレットによって作成されます。
型: | AzureHDInsightConfig |
配置: | 0 |
規定値: | None |
必須: | True |
パイプライン入力を受け取る: | True |
ワイルドカード文字を受け取る: | False |
-Confirm
コマンドレットを実行する前に確認を求めるメッセージが表示されます。
型: | SwitchParameter |
Aliases: | cf |
配置: | Named |
規定値: | False |
必須: | False |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-DefaultProfile
Azure との通信に使用される資格情報、アカウント、テナント、サブスクリプション
型: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
配置: | Named |
規定値: | None |
必須: | False |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-DomainResourceId
クラスターの Active Directory ドメイン リソース ID。
型: | String |
配置: | Named |
規定値: | None |
必須: | True |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-DomainUserCredential
クラスターを作成するための十分なアクセス許可を持つドメイン ユーザー アカウントの資格情報。 ユーザー名はuser@domain形式にする必要があります
型: | PSCredential |
配置: | Named |
規定値: | None |
必須: | True |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-LdapsUrls
Active Directory 用の 1 つまたは複数の LDAPS サーバーの URL
型: | String[] |
配置: | Named |
規定値: | None |
必須: | True |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-OrganizationalUnitDN
ユーザー アカウントとコンピューター アカウントが作成される Active Directory 内の組織単位の識別名
型: | String |
配置: | Named |
規定値: | None |
必須: | False |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
-WhatIf
型: | SwitchParameter |
Aliases: | wi |
配置: | Named |
規定値: | False |
必須: | False |
パイプライン入力を受け取る: | False |
ワイルドカード文字を受け取る: | False |
入力
出力
Azure PowerShell