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.
238
238
239
239
```rest
240
-
PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?api-version=2019-12-01
240
+
PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?api-version=2023-03-01
241
241
```
242
242
243
243
```json
@@ -271,7 +271,8 @@ PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers
271
271
],
272
272
"runAsUser": "userName",
273
273
"runAsPassword": "userPassword",
274
-
"timeoutInSeconds": 3600,
274
+
"timeoutInSeconds": 3600,
275
+
"treatFailureAsDeploymentFailure": true,
275
276
"outputBlobUri": "< SAS URI of a storage append blob with read, add, create, write access>",
276
277
"errorBlobUri": "< SAS URI of a storage append blob with read, add, create, write access >"
277
278
}
@@ -281,28 +282,29 @@ PUT /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers
281
282
### Notes
282
283
283
284
- 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.
284
-
- Only one type of source input is supported for one command execution.
285
+
- Only one type of source input is supported for one command execution.
286
+
- 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 the script failed in case of script failures.
285
287
- 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.
286
288
287
289
288
290
### List running instances of Run Command on a VM
289
291
290
292
```rest
291
-
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands?api-version=2019-12-01
293
+
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands?api-version=2023-03-01
292
294
```
293
295
294
296
### Get output details for a specific Run Command deployment
295
297
296
298
```rest
297
-
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?$expand=instanceView&api-version=2019-12-01
299
+
GET /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/virtualMachines/<vmName>/runcommands/<runCommandName>?$expand=instanceView&api-version=2023-03-01
0 commit comments