Skip to content

Commit 5bf9f57

Browse files
committed
updates
1 parent c3d94fe commit 5bf9f57

File tree

1 file changed

+40
-34
lines changed

1 file changed

+40
-34
lines changed

articles/cognitive-services/manage-resources.md

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,23 @@ To recover a deleted cognitive service resource, use the following commands. Whe
3737
* `{resourceName}` with your resource name
3838
* `{location}` with the location of your resource
3939

40-
# [Using the Rest API](#tab/rest-api)
40+
41+
# [Azure Portal](#tab/azure-portal)
42+
43+
If you need to recover a deleted resource, navigate to the hub of the cognitive 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 option under the "Services" section to land on the "Anomaly detector" hub that will list deleted resources.
44+
45+
46+
:::image type="content" source="media/recovery-of-deleted-resources.png" alt-text="How to recover a deleted resource step 1":::
47+
48+
49+
Select the subscription in the dropdown list to locate the deleted resource you would like to recover.
50+
Select one or more of the deleted resources and click "Recover".
51+
52+
:::image type="content" source="media/managing-deleted-resources.png" alt-text="How to recover a deleted resource step 2":::
53+
54+
Please note that it can take a couple of minutes for your deleted resource(s) to recover and show up in the list of the resources. Click on the "Refresh" button in the menu to update the list of resources.
55+
56+
# [Rest API](#tab/rest-api)
4157

4258
Use the following `PUT` command:
4359

@@ -56,7 +72,7 @@ In the request body, use the following JSON format:
5672
}
5773
```
5874

59-
# [Using PowerShell](#tab/powershell)
75+
# [PowerShell](#tab/powershell)
6076

6177
Use the following command to restore the resource:
6278

@@ -70,23 +86,11 @@ If you need to find the name of your deleted resources, you can get a list of de
7086
Get-AzResource -ResourceId /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/deletedAccounts -ApiVersion 2021-04-30
7187
```
7288

73-
# [Using the Azure CLI](#tab/azure-cli)
89+
# [Azure CLI](#tab/azure-cli)
7490

7591
```azurecli-interactive
7692
az resource create --subscription {subscriptionID} -g {resourceGroup} -n {resourceName} --location {location} --namespace Microsoft.CognitiveServices --resource-type accounts --properties "{\"restore\": true}"
7793
```
78-
# [Using Azure Portal](#tab/azure-portal)
79-
80-
If you need to recover a deleted resource, navigate to the Azure portal and select your Cognitive Services subscription.
81-
Select "Manage deleted resources".
82-
83-
:::image type="content" source="media/recovery-of-deleted-resources.png" alt-text="How to recover a deleted resource step 1":::
84-
85-
86-
Select the subscription in the dropdown list to locate the deleted resource you would like to recover.
87-
Select the deleted resource and click Recover.
88-
89-
:::image type="content" source="media/managing-deleted-resources.png" alt-text="How to recover a deleted resource step 2":::
9094

9195
---
9296

@@ -104,45 +108,47 @@ To purge a deleted cognitive service resource, use the following commands. Where
104108
> [!NOTE]
105109
> Once a resource is purged, it is permanently deleted and cannot be restored. You will lose all data and keys associated with the resource.
106110
107-
# [Using the Rest API](#tab/rest-api)
111+
112+
# [Azure Portal](#tab/azure-portal)
113+
114+
If you need to purge a deleted resource, the steps are similar to recovering a deleted resource.
115+
116+
Navigate to the hub of the cognitive 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 option under the "Services" section to land on the "Anomaly detector" hub that will list deleted resources.
117+
118+
Select "Manage deleted resources" from the menu.
119+
120+
:::image type="content" source="media/recovery-of-deleted-resources.png" alt-text="How to purge a deleted resource step 1":::
121+
122+
Select the subscription in the dropdown list to locate the deleted resource you would like to purge.
123+
Select one or more deleted resources and click "Purge".
124+
Purging will permanently delete a Cognitive Services resource.
125+
126+
:::image type="content" source="media/managing-deleted-resources.png" alt-text="How to purge a deleted resource step 2":::
127+
128+
129+
# [Rest API](#tab/rest-api)
108130

109131
Use the following `DELETE` command:
110132

111133
```rest-api
112134
https://management.azure.com/subscriptions/{subscriptionID}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroup}/deletedAccounts/{resourceName}?Api-Version=2021-04-30`
113135
```
114136

115-
# [Using PowerShell](#tab/powershell)
137+
# [PowerShell](#tab/powershell)
116138

117139
```powershell
118140
Remove-AzResource -ResourceId /subscriptions/{subscriptionID}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroup}/deletedAccounts/{resourceName} -ApiVersion 2021-04-30`
119141
```
120142

121-
# [Using the Azure CLI](#tab/azure-cli)
143+
# [Azure CLI](#tab/azure-cli)
122144

123145
```azurecli-interactive
124146
az resource delete --ids /subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroup}/deletedAccounts/{resourceName}
125147
```
126-
# [Using Azure Portal](#tab/azure-portal)
127-
128-
If you wish to purge a deleted resource, the steps are similar when recovering a deleted resource.
129-
130-
Navigate to the Azure portal and select your Cognitive Services subscription.
131-
Select "Manage deleted resources".
132-
133-
:::image type="content" source="media/recovery-of-deleted-resources.png" alt-text="How to purge a deleted resource step 1":::
134-
135-
Select the subscription in the dropdown list to locate the deleted resource you would like to purge.
136-
Select the deleted resource and click Purge.
137-
Purging will permanently delete a Cognitive Services resource.
138-
139-
140-
:::image type="content" source="media/managing-deleted-resources.png" alt-text="How to purge a deleted resource step 2":::
141148

142149
---
143150

144151

145-
146152
## See also
147153
* [Create a new resource using the Azure portal](cognitive-services-apis-create-account.md)
148154
* [Create a new resource using the Azure CLI](cognitive-services-apis-create-account-cli.md)

0 commit comments

Comments
 (0)