Skip to content

Commit d4256e0

Browse files
authored
Added force delete capability
1 parent 2290f72 commit d4256e0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,29 @@ You can delete a workspace using [PowerShell](https://docs.microsoft.com/powersh
5555
PS C:\>Remove-AzOperationalInsightsWorkspace -ResourceGroupName "resource-group-name" -Name "workspace-name"
5656
```
5757

58+
## Permanent workspace delete
59+
60+
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. You can permanently delete your workspace and “override” the soft-delete period. The permanent workspace delete operation releases the workplace name and you can create a new workspace using the same name.
61+
62+
> [!Important]
63+
> Use cautious when permanently deleting your workspace since the operation is irreversible and your workspace and its data won’t be recoverable.
64+
65+
The permanent workspace delete can be performed via REST API currently.
66+
67+
> [Information]
68+
> Any API request must include a Bearer authorization token in the request header.
69+
>
70+
> You can acquire the token using:
71+
> - [App registrations](https://docs.microsoft.com/graph/auth/auth-concepts#access-tokens)
72+
> - Navigate to Azure portal in “developer tool” (F12), look in one of the “batch?” instances and look for the authentication string under “Request Headers” – it looks like this: “authorization: Bearer <token>”. Copy and add it to your API call as shown in the examples.
73+
> - Navigate to Azure REST documentation site – press “Try it” on any API and copy the Bearer token and add it to your API call.
74+
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:
75+
76+
```rst
77+
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**
78+
Authorization: Bearer eyJ0eXAiOiJKV1Qi….
79+
```
80+
5881
## Recover workspace
5982

6083
If you have Contributor permissions to the subscription and resource group where the workspace was associated before the soft-delete operation, you can recover it during its soft-delete period including its data, configuration and connected agents. After the soft-delete period, the workspace is non-recoverable and assigned for permanent deletion. Names of deleted workspaces are preserved during the soft-delete period and can't be used when attempting to create a new workspace.

0 commit comments

Comments
 (0)