Skip to content

Commit d19cc54

Browse files
authored
Merge pull request #101721 from yossi-y/patch-39
Added force delete capability
2 parents 05e9d20 + d111f29 commit d19cc54

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+
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 workplace name and you can create a new workspace using the same name.
60+
61+
62+
> [!IMPORTANT]
63+
> Use caution 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 currently be performed via REST API.
66+
67+
> [!NOTE]
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 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.
73+
> - Navigate to the Azure REST documentation site. press **Try it** on any API, 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)