次の方法で共有


Update-AzHDInsightCluster

HDInsight クラスターのタグまたはマネージド ID を更新します。

構文

Update-AzHDInsightCluster
      [-ClusterName] <String>
      [-IdentityType <String>]
      [-IdentityId <String[]>]
      [-Tag <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
      [-ResourceGroupName <String>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

説明

この Update-AzHDInsightCluster コマンドレットは、HDInsight クラスターのタグまたはマネージド ID を更新します。

例 1: クラスターのタグを更新します。

$clusterName = "your-hadoop-001"
$tags = New-Object 'System.Collections.Generic.Dictionary[System.String,System.String]'
$tags.Add('Tag1', 'Value1')
$tags.Add('Tag2', 'Value2')

Update-AzHDInsightCluster -ClusterName $clusterName -Tag $tags

例 2: 単一の UserAssigned msi で管理 ID を更新する。

$clusterName = "your-hadoop-001"
$identityType = "UserAssigned"
$identityId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft ManagedIdentity/userAssignedIdentities/hdi-msi"

Update-AzHDInsightCluster -ClusterName $clusterName -IdentityType $identityType -IdentityId $identityId

例 3: 複数の UserAssigned msi を使用して管理 ID を更新する。

$clusterName = "your-hadoop-001"
$identityType = "UserAssigned"
$identityIds = @(
 "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/hdi-msi",
 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/hdi-msi1"
)

Update-AzHDInsightCluster -ClusterName $clusterName -IdentityType $identityType -IdentityId $identityIds

例 4: SystemAssigned 管理 ID を更新する。

$clusterName = "your-hadoop-001"
$identityType = "SystemAssigned"
$identityId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/hdi-msi"

Update-AzHDInsightCluster -ClusterName $clusterName -IdentityType $identityType

例 5: SystemAssigned、UserAssigned msi を使用して管理 ID を更新する。

$clusterName = "your-hadoop-001"
$identityId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/hdi-msi"
$identityType = "SystemAssigned,UserAssigned"

Update-AzHDInsightCluster -ClusterName $clusterName -IdentityType $identityType -IdentityId $identityId

パラメーター

-ClusterName

クラスターの名前を取得または設定します。

型:String
配置:0
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Confirm

コマンドレットを実行する前に確認を求めるメッセージが表示されます。

型:SwitchParameter
Aliases:cf
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-DefaultProfile

Azure との通信に使用される資格情報、アカウント、テナント、サブスクリプション。

型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-IdentityId

クラスターに関連付けられているユーザー ID の一覧を取得または設定します。

型:String[]
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-IdentityType

クラスターに使用される ID の種類を取得または設定します。 使用可能な値は、SystemAssigned、UserAssigned です。

型:String
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ResourceGroupName

リソース グループの名前を取得または設定します。

型:String
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-Tag

リソース タグ。

型:Dictionary<TKey,TValue>[System.String,System.String]
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-WhatIf

コマンドレットを実行した場合の動作を示します。 コマンドレットは実行されません。

型:SwitchParameter
Aliases:wi
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

入力

None

出力