You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/update-center/manage-arc-enabled-servers-programmatically.md
+10-21Lines changed: 10 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article tells how to use Update management center (preview) us
4
4
ms.service: update-management-center
5
5
author: SnehaSudhirG
6
6
ms.author: sudhirsneha
7
-
ms.date: 02/20/2023
7
+
ms.date: 03/31/2023
8
8
ms.topic: conceptual
9
9
---
10
10
@@ -21,7 +21,7 @@ Support for Azure REST API to manage Azure Arc-enabled servers is available thro
21
21
To trigger an update assessment on your Azure Arc-enabled server, specify the following POST request:
22
22
23
23
```rest
24
-
POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/provider/Microsoft.HybridCompute/machines/machineName/assessPatches?api-version=2020-08-15-preview`
24
+
POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName/assessPatches?api-version=2020-08-15-preview`
25
25
{
26
26
}
27
27
```
@@ -31,7 +31,7 @@ POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/provider/
31
31
To specify the POST request, you can use the Azure CLI [az rest](/cli/azure/reference-index#az_rest) command.
32
32
33
33
```azurecli
34
-
az rest --method post --url https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/provider/Microsoft.HybridCompute/machines/machineName/assessPatches?api-version=2020-08-15-preview --body @body.json
34
+
az rest --method post --url https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName/assessPatches?api-version=2020-08-15-preview --body @body.json
35
35
```
36
36
37
37
The format of the request body for version 2020-08-15 is as follows:
@@ -43,28 +43,21 @@ The format of the request body for version 2020-08-15 is as follows:
43
43
44
44
# [Azure PowerShell](#tab/powershell)
45
45
46
-
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
46
+
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod-Path](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
To trigger an update deployment to your Azure Arc-enabled server, specify the following POST request:
65
58
66
59
```rest
67
-
POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/provider/Microsoft.HybridCompute/machines/machineName/installPatches?api-version=2020-08-15-preview`
60
+
POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.HybridCompute/machines/machineName/installPatches?api-version=2020-08-15-preview`
68
61
```
69
62
70
63
#### Request body
@@ -154,12 +147,8 @@ To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMeth
Copy file name to clipboardExpand all lines: articles/update-center/manage-vms-programmatically.md
+12-53Lines changed: 12 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article tells how to use update management center (preview) in
4
4
ms.service: update-management-center
5
5
author: SnehaSudhirG
6
6
ms.author: sudhirsneha
7
-
ms.date: 04/21/2022
7
+
ms.date: 03/31/2023
8
8
ms.topic: conceptual
9
9
---
10
10
@@ -26,26 +26,19 @@ POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers
26
26
27
27
# [Azure CLI](#tab/cli)
28
28
29
-
To specify the POST request, you can use the Azure CLI [az rest](/cli/azure/reference-index#az_rest) command.
29
+
To specify the POST request, you can use the Azure CLI [az vm assess-patches](https://learn.microsoft.com/cli/azure/vm?view=azure-cli-latest#az-vm-assess-patches) command.
30
30
31
31
```azurecli
32
-
az rest --method post --url https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/virtualMachineName/assessPatches?api-version=2020-12-01
32
+
az vm assess-patches -g MyResourceGroup -n MyVm
33
33
```
34
34
35
+
35
36
# [Azure PowerShell](#tab/powershell)
36
37
37
-
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
38
+
To specify the POST request, you can use the Azure PowerShell [Invoke-AzVMPatchAssessment](https://learn.microsoft.com/powershell/module/az.compute/invoke-azvmpatchassessment?view=azps-9.5.0) cmdlet.
@@ -107,69 +100,35 @@ POST on 'subscriptions/{subscriptionId}/resourceGroups/acmedemo/providers/Micros
107
100
108
101
# [Azure CLI](#tab/azurecli)
109
102
110
-
To specify the POST request, you can use the Azure CLI [az rest](/cli/azure/reference-index#az_rest) command.
103
+
To specify the POST request, you can use the Azure CLI [az vm install-patches](https://learn.microsoft.com/cli/azure/vm?view=azure-cli-latest#az-vm-install-patches) command.
111
104
112
105
```azurecli
113
-
az rest --method post --url https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/virtualMachineName/installPatches?api-version=2020-12-01 @body.json
106
+
az vm install-patches -g MyResourceGroup -n MyVm --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-linux Critical
114
107
```
115
108
116
109
The format of the request body for version 2020-12-01 is as follows:
117
110
118
111
```json
119
112
{
120
-
"maximumDuration": "PT120M",
121
-
"rebootSetting": "IfRequired",
113
+
"maximumDuration"
114
+
"rebootSetting"
122
115
"windowsParameters": {
123
116
"classificationsToInclude": [
124
-
"Security",
125
-
"UpdateRollup",
126
-
"FeaturePack",
127
-
"ServicePack"
128
117
],
129
118
"kbNumbersToInclude": [
130
-
"11111111111",
131
-
"22222222222222"
132
119
],
133
120
"kbNumbersToExclude": [
134
-
"333333333333",
135
-
"55555555555"
136
121
]
137
122
}
138
123
}
139
124
```
140
125
141
126
# [Azure PowerShell](#tab/azurepowershell)
142
127
143
-
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
128
+
To specify the POST request, you can use the Azure PowerShell [Invoke-AzVMInstallPatch](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
0 commit comments