Skip to content

Commit cffba44

Browse files
committed
Authoring new guidance on required permissions and how-to options
1 parent ccb9e9a commit cffba44

File tree

1 file changed

+61
-3
lines changed

1 file changed

+61
-3
lines changed

articles/azure-monitor/logs/move-workspace.md

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In this article, you'll learn the steps to move a Log Analytics workspace to ano
2424
- To verify the Azure Active Directory tenant, you need `Microsoft.AzureActiveDirectory/b2cDirectories/read` permissions, as provided by the [Log Analytics Reader built-in role](./manage-access.md#log-analytics-reader), for example.
2525
- To delete a solution, you need `Microsoft.OperationsManagement/solutions/delete` permissions on it, as provided by the [Log Analytics Contributor built-in role](./manage-access.md#log-analytics-contributor), for example.
2626
- To remove alert rules for the Start/Stop VMs solution, you need `microsoft.insights/scheduledqueryrules/delete` permissions, as provided by the [Monitoring Contributor built-in role](../../role-based-access-control/built-in-roles.md#monitoring-contributor), for example.
27-
To unlink the Automation account, you need
27+
- To unlink the Automation account, you need `Microsoft.OperationalInsights/workspaces/linkedServices/delete` permissons on the linked workspace, as provided by the [Log Analytics Contributor built-in role](./manage-access.md#log-analytics-contributor), for example.
2828
- To move a Log Analytics workspace, you need `Microsoft.OperationalInsights/workspaces/delete` and `Microsoft.OperationalInsights/workspaces/write` permissions on it, as provided by the [Log Analytics Contributor built-in role](./manage-access.md#log-analytics-contributor), for example.
2929

3030
## Verify the Azure Active Directory tenant
@@ -139,7 +139,10 @@ Remove-AzResource -ResourceType 'Microsoft.OperationsManagement/solutions' -Reso
139139
---
140140

141141
### Remove alert rules for the Start/Stop VMs solution
142-
To remove the **Start/Stop VMs** solution, you also need to remove the alert rules created by the solution. Use the following procedure in the Azure portal to remove these rules:
142+
143+
To remove the **Start/Stop VMs** solution, you also need to remove the alert rules created by the solution.
144+
145+
### [Portal](#tab/azure-portal)
143146

144147
1. Open the **Monitor** menu and then select **Alerts**.
145148
1. Select **Manage alert rules**.
@@ -151,15 +154,70 @@ To remove the **Start/Stop VMs** solution, you also need to remove the alert rul
151154

152155
[![Screenshot that shows deleting rules.](media/move-workspace/delete-rules.png)](media/move-workspace/delete-rules.png#lightbox)
153156

157+
### [REST API](#tab/rest-api)
158+
159+
Delete the following alert rules by calling the Scheduled Query Rules - Delete API:
160+
161+
- AutoStop_VM_Child
162+
- ScheduledStartStop_Parent
163+
- SequencedStartStop_Parent
164+
165+
```http
166+
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}?api-version=2023-03-15-preview
167+
```
168+
169+
### [CLI](#tab/cli)
170+
171+
Run the [az monitor scheduled-query delete](/cli/azure/monitor/scheduled-query#az-monitor-scheduled-query-delete) command:
172+
173+
```azurecli
174+
az monitor scheduled-query delete [--ids]
175+
[--name]
176+
[--resource-group]
177+
[--subscription]
178+
[--yes]
179+
```
180+
181+
### [PowerShell](#tab/PowerShell)
182+
183+
Run the [Remove-AzScheduledQueryRule](/powershell/module/az.monitor/remove-azscheduledqueryrule) command.
184+
185+
---
186+
154187
## Unlink the Automation account
155-
Use the following procedure to unlink the Automation account from the workspace by using the Azure portal:
188+
189+
### [Portal](#tab/azure-portal)
156190

157191
1. Open the **Automation accounts** menu and then select the account to remove.
158192
1. On the **Related Resources** section of the menu, select **Linked workspace**.
159193
1. Select **Unlink workspace** to unlink the workspace from your Automation account.
160194

161195
[![Screenshot that shows unlinking a workspace.](media/move-workspace/unlink-workspace.png)](media/move-workspace/unlink-workspace.png#lightbox)
162196

197+
### [ REST API](#tab/rest-api)
198+
199+
Call the [Linked Services - Delete API](/rest/api/loganalytics/linked-services/delete).
200+
201+
```http
202+
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}?api-version=2020-08-01
203+
```
204+
205+
### [CLI](#tab/cli)
206+
207+
Run the [az monitor log-analytics workspace linked-service delete](/cli/azure/monitor/log-analytics/workspace/linked-service) command:
208+
209+
```azurecli
210+
az monitor log-analytics workspace linked-service delete -g MyResourceGroup -n cluster --workspace-name MyWorkspace
211+
```
212+
213+
Specify `automation` as the name of the linkedServices resource.
214+
215+
### [PowerShell](#tab/PowerShell)
216+
217+
Not supported.
218+
219+
---
220+
163221
## Move your workspace
164222

165223
### [Portal](#tab/azure-portal)

0 commit comments

Comments
 (0)