-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run command as Rest API - body of the API call documentation not clear #5
Comments
I can use run command from portal and azure cli, but nt as rest api |
BODY: This is what I was able to do, the parameters don't work if you use Executing the script directly didn't work for me. |
To pass arg1 to the script you need to define that parameters on top of the script: |
script is an array of strings to support multiline in json. Try using: |
I was following this documentation and trying to run a simple shell script in a vm using this.
https://docs.microsoft.com/en-us/rest/api/compute/virtual%20machines%20run%20commands/runcommand#runcommandinputparameter
But what needs to be the content of the body of the post request is not clear. The commandID can be RunShellScript but where doe we provide the script value.
and other each resulting in
{
"error": {
"code": "BadRequest",
"message": "Error converting value "/home/adminwm/quick-python-test.sh" to type 'System.Collections.Generic.List`1[System.String]'. Path 'script', line 3, position 52.",
"target": "runCommandInput.script"
}
}
The text was updated successfully, but these errors were encountered: