Set-AzHDInsightClusterDiskEncryptionKey
Rotates the disk encryption key of the specified HDInsight cluster.
Syntax
SetByNameParameterSet (Default)
Set-AzHDInsightClusterDiskEncryptionKey
[-ResourceGroupName] <String>
[-Name] <String>
-EncryptionKeyName <String>
-EncryptionKeyVersion <String>
-EncryptionVaultUri <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceIdParameterSet
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.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EncryptionKeyName
Gets or sets the encryption key name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EncryptionKeyVersion
Gets or sets the encryption key version.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EncryptionVaultUri
Gets or sets the encryption vault uri.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Gets or sets the input object.
SetByInputObjectParameterSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Gets or sets the name of the cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ClusterName
Parameter sets
SetByNameParameterSet
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Gets or sets the name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByNameParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
Gets or sets the resource id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceIdParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
None
Outputs