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
To deploy a new Run Command, execute a PUT on the VM directly and specify a unique name for the Run Command instance.
211
211
212
212
```rest
213
-
PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?api-version=2019-12-01
213
+
PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?api-version=2023-03-01
214
214
```
215
215
216
216
```json
@@ -244,7 +244,8 @@ PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers
244
244
],
245
245
"runAsUser": "userName",
246
246
"runAsPassword": "userPassword",
247
-
"timeoutInSeconds": 3600,
247
+
"timeoutInSeconds": 3600,
248
+
"treatFailureAsDeploymentFailure": true,
248
249
"outputBlobUri": "< SAS URI of a storage append blob with read, add, create, write access>",
249
250
"errorBlobUri": "< SAS URI of a storage append blob with read, add, create, write access >"
250
251
}
@@ -254,28 +255,29 @@ PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers
254
255
### Notes
255
256
256
257
- You can provide an inline script, a script URI, or a built-in script [command ID](run-command.md#available-commands) as the input source. Script URI is either storage blob SAS URI with read access or public URI.
257
-
- Only one type of source input is supported for one command execution.
258
+
- Only one type of source input is supported for one command execution.
259
+
- Starting with API version 2023-03-01, you can set the property `treatFailureAsDeploymentFailure` to **true** causing the deployment to fail when there is a failure in the script. If set to **false**, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures.
258
260
- Run Command supports writing output and error to Storage blobs using outputBlobUri and errorBlobUri parameters, which can be used to store large script outputs. Use SAS URI of a storage append blob with read, add, create, write access. The blob should be of type AppendBlob. Writing the script output or error blob would fail otherwise. The blob will be overwritten if it already exists. It will be created if it does not exist.
259
261
260
262
261
263
### List running instances of Run Command on a VM
262
264
263
265
```rest
264
-
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands?api-version=2019-12-01
266
+
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands?api-version=2023-03-01
265
267
```
266
268
267
269
### Get output details for a specific Run Command deployment
268
270
269
271
```rest
270
-
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?$expand=instanceView&api-version=2019-12-01
272
+
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?$expand=instanceView&api-version=2023-03-01
0 commit comments