AzureKeyVault (version 1.0.3)

delete_key_vault: Delete an Azure Key Vault

Description

Method for the AzureRMR::az_resource_group class.

Value

NULL on successful deletion.

Usage

delete_key_vault(name, confirm=TRUE, wait=FALSE, purge=FALSE)

Arguments

  • name: The name of the key vault.

  • confirm: Whether to ask for confirmation before deleting.

  • wait: Whether to wait until the deletion is complete. Note that purge=TRUE will set wait=TRUE as well.

  • purge: For a vault with the soft-deletion feature enabled, whether to purge it as well (hard delete). Has no effect if the vault does not have soft-deletion enabled.

Details

Deleting a key vault that has soft-deletion enabled does not permanently remove it. Instead the resource is held for a given retention period (90 days), during which it can be recovered, essentially undoing the deletion.

To see what soft-deleted key vaults exist, call the list_deleted_key_vaults method. To recover a soft-deleted key vault, call the create_key_vault method from the vault's original resource group, with the vault name. To purge (permanently delete) it, call the purge_key_vault method.

See Also

create_key_vault, get_key_vault, purge_key_vault, list_deleted_key_vaults, az_key_vault,

Azure Key Vault documentation, Azure Key Vault API reference

Examples

Run this code
# NOT RUN {
rg <- AzureRMR::get_azure_login()$
    get_subscription("subscription_id")$
    get_resource_group("rgname")

# assuming the vault has soft-delete enabled
rg$delete_key_vault("mykeyvault", purge=FALSE)

# recovering a soft-deleted key vault
rg$create_key_vault("mykeyvault")

# deleting it for good
rg$delete_key_vault("mykeyvault", purge=FALSE)

# }

Run the code above in your browser using DataLab