Comment on page
If your RunBook is part of a pipeline you'll want the results of the RunBook execution to continue your process
RunBooks are able to publish output data. The output is a JSON collection of data collected from the Actions inside your RunBook.
To define your output parameters (these will be the "key" in the output JSON):
- 1.Click the Parameters option in the top navigation.
- 2.Choose the submenu "Output."
- 3.Select "Add Input Parameter."
A Dialogue will appear, where you can enter the values that correspond to the data you wish to add to the RunBook output: In this example, the output will have the name 'iam_users', and will be a list.
Output parameter addition dialogue
Each Action has an Output section:
To add the output from this action to the RunBook output, select the "RunBook Output" checkbox.
A new text box will appear. Add the output parameter you wish to connect your Action output to. In this case, we are connecting the output from "AWS List all IAM Users" to the "iam_users" output.
Glue Actions are Python code without a connector. You can add output parmeters from glue actions with the following command:
#place the value you wish to output into a variable
variable = "foo"
For example, If we wanted to output a random IAM user, we could use the following glue Action
random_number = random.randint(0, len(iams)-1)
This code reads in the list of IAM users, and randomly selects one of them. The last two lines add RunBook outputs - "random_number" and "random_user". For this to run successfully, both of these must be added as output parameters:
In the Execution menu of unSkript, find the RunBook execution you wish to examine. Click the Output tab, and you will see the RunBook output:
Screenshot of outputs tab of a RunBook execution