Member since
01-19-2018
2
Posts
0
Kudos Received
0
Solutions
01-22-2018
02:46 PM
@Aditya Sirna Thank you for the quick response! That was exactly what I needed.
... View more
01-19-2018
11:53 PM
Thanks for the article, it is very helpful. I'd like to point out that in the article you included the note: Note: You can add comma separated inputs if you need any inputs for the script. That is great because I need to pass my script an input. I was able to create the custom action definition so that it expects and input (as you suggested was possible). Unfortunately I can't find anywhere that tells/shows how to pass the input. I have tried something like the following: curl -u <username>:<password> -X POST -H 'X-Requested-By:ambari' -d'{"RequestInfo":{"context":"Execute my action", "action":"my_action"}, "Requests/resource_filters":[{"service_name":"", "component_name":"", "hosts":"<comma_separated_host_names>"}], "Requests/inputs":{"my_input":"input_value"}}' http://<ambari_host>:<port>/api/v1/clusters/<cluster_name>/requests but that returns a 500 error saying: An internal system exception occurred. Action my_action requires input 'my_input' that is not provided. All my attempts so far have resulted in a 500 return code with the same message. So how am I supposed to pass the custom action its input via curl?
... View more