Bearbeiten

Freigeben über


Set-AzHDInsightClusterDiskEncryptionKey

Rotates the disk encryption key of the specified HDInsight cluster.

Syntax

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

Rotate the disk encryption key of the specified HDInsight cluster. For this operation, the cluster must have access to both the current key and the intended new key, otherwise the rotate key operation will fail.

Examples

Example 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

Example 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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

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

-EncryptionKeyName

Gets or sets the encryption key name.

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

-EncryptionKeyVersion

Gets or sets the encryption key version.

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

-EncryptionVaultUri

Gets or sets the encryption vault uri.

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

-InputObject

Gets or sets the input object.

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

-Name

Gets or sets the name of the cluster.

Type:String
Aliases:ClusterName
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Gets or sets the name of the resource group.

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

-ResourceId

Gets or sets the resource id.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Cluster