gpt4 book ai didi

azure - 不允许操作 'DeletedVaultPurge' - 尝试清除 Azure Key Vault

转载 作者:行者123 更新时间:2023-12-03 00:58:24 26 4
gpt4 key购买 nike

我正在使用我的个人 Azure 帐户和 Visual Studio Azure 订阅,我是全局管理员。当我尝试清除软删除的 Azure Key Vault 时,出现以下错误。

使用 Azure Power Shell:

Remove-AzKeyVault: Operation 'DeletedVaultPurge' is not allowed.

使用 Azure CLI:

ValidationError: (MethodNotAllowed) Operation 'DeletedVaultPurge' is not allowed.

尽管我是全局管理员,但似乎有我没有的权限。那么我需要做什么才能清除软删除的 Key Vault?

以下是我可以在 Azure Power Shell (4.7.0) 中重现错误的步骤:

首先,我创建一个 key 保管库:

New-AzKeyVault -Name $keyVaultName -ResourceGroupName $resourceGroupName -Location $location -EnablePurgeProtection

然后我删除它。

Remove-AzKeyVault -Name $keyVaultName -ResourceGroupName $resourceGroupName

然后尝试清除软删除的 Key Vault:

Remove-AzKeyVault -Name $keyVaultName -Location $location -InRemovedState -Force

Remove-AzKeyVault: Operation 'DeletedVaultPurge' is not allowed.

最佳答案

原因是您在创建 keystore 时启用了清除保护

一旦启用清除保护,就不允许将其删除。请引用doc更多细节。我刚刚粘贴了文档的一部分,如下所示:

打开清除保护后,在保留期过后之前,无法清除处于已删除状态的保管库或对象。

另请注意,如果启用了清除保护,则无法将其禁用。因此,在创建 key 保管库期间,请确保清除保护已禁用,然后重试该命令。

关于azure - 不允许操作 'DeletedVaultPurge' - 尝试清除 Azure Key Vault,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64091555/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com