Skip to content

Commit ad131d2

Browse files
authored
Merge pull request #116463 from yossi-y/patch-6
Added reference to rest doc site
2 parents ac63e16 + 87a0f63 commit ad131d2

File tree

1 file changed

+24
-27
lines changed

1 file changed

+24
-27
lines changed

articles/azure-monitor/platform/delete-workspace.md

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.subservice: logs
55
ms.topic: conceptual
66
author: bwren
77
ms.author: bwren
8-
ms.date: 05/19/2020
8+
ms.date: 05/26/2020
99

1010
---
1111

@@ -54,39 +54,28 @@ You can delete a workspace using [PowerShell](https://docs.microsoft.com/powersh
5454
PS C:\>Remove-AzOperationalInsightsWorkspace -ResourceGroupName "resource-group-name" -Name "workspace-name"
5555
```
5656

57-
### Troubleshooting
58-
59-
You must have at least *Log Analytics Contributor* permissions to delete a workspace.<br>
60-
If you get an error message *This workspace name is already in use* or *conflict* when creating a workspace, it could be since:
61-
* The workspace name isn't available and being used by someone in your organization, or by other customer.
62-
* The workspace was deleted in the last 14 days and its name kept reserved for the soft-delete period. To override the soft-delete and permanently delete your workspace to create a new workspace with the same name, follow these steps to recover the workspace first and perform permanent delete:<br>
63-
1. [Recover](https://docs.microsoft.com/azure/azure-monitor/platform/delete-workspace#recover-workspace) your workspace.
64-
2. [Permanently delete](https://docs.microsoft.com/azure/azure-monitor/platform/delete-workspace#permanent-workspace-delete) your workspace.
65-
3. Create a new workspace using the same workspace name.
66-
6757
## Permanent workspace delete
6858
The soft-delete method may not fit in some scenarios such as development and testing, where you need to repeat a deployment with the same settings and workspace name. In such cases you can permanently delete your workspace and "override" the soft-delete period. The permanent workspace delete operation releases the workspace name and you can create a new workspace using the same name.
6959

7060

7161
> [!IMPORTANT]
7262
> Use permanent workspace delete operation with caution since its irreversible and you won't be able to recover your workspace and its data.
7363
74-
The permanent workspace delete can currently be performed via REST API.
64+
To permanently delete your workspace, use the [Workspaces – Delete](https://docs.microsoft.com/rest/api/loganalytics/workspaces/delete) REST request with a force tag:
7565

76-
> [!NOTE]
77-
> Any API request must include a Bearer authorization token in the request header.
78-
>
79-
> You can acquire the token using:
80-
> - [App registrations](https://docs.microsoft.com/graph/auth/auth-concepts#access-tokens)
81-
> - Navigate to Azure portal using the developer's console (F12) in the browser. Look in one of the **batch?** instances for the authentication string under **Request Headers**. This will be in the pattern *authorization: Bearer <token>*. Copy and add this to your API call as shown in the examples.
82-
> - Navigate to the Azure REST documentation site. press **Try it** on any API, copy the Bearer token, and add it to your API call.
83-
To permanently delete your workspace, use the [Workspaces - Delete REST]( https://docs.microsoft.com/rest/api/loganalytics/workspaces/delete) API call with a force tag:
84-
>
85-
> ```rst
86-
> DELETE https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>?api-version=2015-11-01-preview&force=true
87-
> Authorization: Bearer eyJ0eXAiOiJKV1Qi….
88-
> ```
89-
Where 'eyJ0eXAiOiJKV1Qi…' represents the full authorization token.
66+
```rst
67+
DELETE https://management.azure.com/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>?api-version=2015-11-01-preview&force=true
68+
Authorization: Bearer <token>
69+
```
70+
71+
Alternatively, you can execute the operation from Azure REST documentation site:
72+
1. Navigate to [Workspaces – Delete](https://docs.microsoft.com/rest/api/loganalytics/workspaces/delete) REST API and click **Try it**.
73+
2. Enter details of the workspace you want to permanently delete
74+
3. Ender a new parameter *force* with value *true*
75+
4. Click the ‘+’ icon on the right to the value. This will add *force=true* to the URI in the request
76+
5. Click the *Run* button
77+
78+
The response should be 200 OK
9079

9180
## Recover workspace
9281
When you delete a Log Analytics workspace accidentally or intentionally, the service places the workspace in a soft-delete state making it inaccessible to any operation. The name of the deleted workspace is preserved during the soft-delete period and can't be used for creating a new workspace. After the soft-delete period, the workspace is non-recoverable, it is scheduled for permanent deletion and its name it released and can be used for creating a new workspace.
@@ -121,4 +110,12 @@ The workspace and all its data are brought back after the recovery operation. So
121110

122111
> [!NOTE]
123112
> * Re-creating a workspace during the soft-delete period gives an indication that this workspace name is already in use.
124-
>
113+
114+
### Troubleshooting
115+
You must have at least *Log Analytics Contributor* permissions to delete a workspace.<br>
116+
If you get an error message *This workspace name is already in use* or *conflict* when creating a workspace, it could be since:
117+
* The workspace name isn't available and being used by someone in your organization, or by other customer.
118+
* The workspace was deleted in the last 14 days and its name kept reserved for the soft-delete period. To override the soft-delete and permanently delete your workspace to create a new workspace with the same name, follow these steps to recover the workspace first and perform permanent delete:<br>
119+
1. [Recover](https://docs.microsoft.com/azure/azure-monitor/platform/delete-workspace#recover-workspace) your workspace.
120+
2. [Permanently delete](https://docs.microsoft.com/azure/azure-monitor/platform/delete-workspace#permanent-workspace-delete) your workspace.
121+
3. Create a new workspace using the same workspace name.

0 commit comments

Comments
 (0)