Επεξεργασία

Κοινή χρήση μέσω


Recover or purge deleted Azure AI services resources

This article provides instructions on how to recover or purge an Azure AI services resource that is already deleted.

Once you delete a resource, you won't be able to create another one with the same name for 48 hours. To create a resource with the same name, you need to purge the deleted resource.

Note

  • The instructions in this article are applicable to both a multi-service resource and a single-service resource. A multi-service resource enables access to multiple Azure AI services using a single key and endpoint. On the other hand, a single-service resource enables access to just that specific Azure AI service for which the resource was created.

  • Charges for provisioned deployments on a deleted resource will continue until the resource is purged. To prevent this, delete a resource's deployment before deleting the resource.

Recover a deleted resource

The following prerequisites must be met before you can recover a deleted resource:

  • The resource to be recovered must have been deleted within the past 48 hours.
  • The resource to be recovered must not have been purged already. A purged resource can't be recovered.
  • Before you attempt to recover a deleted resource, make sure that the resource group for that account exists. If the resource group was deleted, you must recreate it. Recovering a resource group isn't possible. For more information, see Manage resource groups.
  • If the deleted resource used customer-managed keys with Azure Key Vault and the key vault have also been deleted, then you must restore the key vault before you restore the Azure AI services resource. For more information, see Azure Key Vault recovery management.
  • If the deleted resource used a customer-managed storage and storage account has also been deleted, you must restore the storage account before you restore the Azure AI services resource. For instructions, see Recover a deleted storage account.

To recover a deleted Azure AI services resource, use the following commands. Where applicable, replace:

  • {subscriptionID} with your Azure subscription ID
  • {resourceGroup} with your resource group
  • {resourceName} with your resource name
  • {location} with the location of your resource

If you need to recover a deleted resource, navigate to the hub of the Azure AI services API type and select "Manage deleted resources" from the menu. For example, if you would like to recover an "Anomaly detector" resource, search for "Anomaly detector" in the search bar and select the service. Then select Manage deleted resources.

Select the subscription in the dropdown list to locate the deleted resource you would like to recover. Select one or more of the deleted resources and select Recover.

A screenshot showing deleted resources you can recover.

Note

It can take a couple of minutes for your deleted resource(s) to recover and show up in the list of the resources. Select the Refresh button in the menu to update the list of resources.

Purge a deleted resource

Your subscription must have Microsoft.CognitiveServices/locations/resourceGroups/deletedAccounts/delete permissions to purge resources, such as Cognitive Services Contributor or Contributor.

When using Contributor to purge a resource the role must be assigned at the subscription level. If the role assignment is only present at the resource or resource group level, you can't access the purge functionality.

To purge a deleted Azure AI services resource, use the following commands. Where applicable, replace:

  • {subscriptionID} with your Azure subscription ID
  • {resourceGroup} with your resource group
  • {resourceName} with your resource name
  • {location} with the location of your resource

Note

Once a resource is purged, it is permanently deleted and cannot be restored. You will lose all data and keys associated with the resource.

If you need to purge a deleted resource, the steps are similar to recovering a deleted resource.

  1. Navigate to the hub of the Azure AI services API type of your deleted resource. For example, if you would like to purge an "Anomaly detector" resource, search for "Anomaly detector" in the search bar and select the service. Then select Manage deleted resources from the menu.

  2. Select the subscription in the dropdown list to locate the deleted resource you would like to purge.

  3. Select one or more deleted resources and select Purge. Purging permanently deletes an Azure AI services resource.

    A screenshot showing a list of resources that can be purged.