共用方式為


Set-AzHDInsightClusterDiskEncryptionKey

輪替指定 HDInsight 叢集的磁碟加密金鑰。

語法

Set-AzHDInsightClusterDiskEncryptionKey
   [-ResourceGroupName] <String>
   [-Name] <String>
   -EncryptionKeyName <String>
   -EncryptionKeyVersion <String>
   -EncryptionVaultUri <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterDiskEncryptionKey
   [-ResourceId] <String>
   -EncryptionKeyName <String>
   -EncryptionKeyVersion <String>
   -EncryptionVaultUri <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzHDInsightClusterDiskEncryptionKey
   [-InputObject] <AzureHDInsightCluster>
   -EncryptionKeyName <String>
   -EncryptionKeyVersion <String>
   -EncryptionVaultUri <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

輪替指定 HDInsight 叢集的磁碟加密金鑰。 針對這項作業,叢集必須同時存取目前密鑰和預定的新金鑰,否則輪替密鑰作業將會失敗。

範例

範例 1

# Cluster configuration info
        $clusterResourceGroupName = "Group"
        $clusterName = "your-cmk-cluster"

Set-AzHDInsightClusterDiskEncryptionKey `
		-ResourceGroupName $clusterResourceGroupName `
		-ClusterName $clusterName `
		-EncryptionKeyName new-key `
		-EncryptionVaultUri https://MyKeyVault.vault.azure.net `
		-EncryptionKeyVersion 00000000000000000000000000000000

範例 2

# Cluster configuration info
        $clusterName = "your-cmk-cluster"

$cluster= Get-AzHDInsightCluster -ClusterName $clusterName 
$cluster |  Set-AzHDInsightClusterDiskEncryptionKey `
    -EncryptionKeyName new-key `
    -EncryptionVaultUri https://MyKeyVault.vault.azure.net `
    -EncryptionKeyVersion 00000000000000000000000000000000

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-EncryptionKeyName

取得或設定加密金鑰名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-EncryptionKeyVersion

取得或設定加密金鑰版本。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-EncryptionVaultUri

取得或設定加密保存庫 URI。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-InputObject

取得或設定輸入物件。

類型:AzureHDInsightCluster
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

取得或設定叢集的名稱。

類型:String
別名:ClusterName
Position:1
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

取得或設定資源群組的名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceId

取得或設定資源標識碼。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

Cluster