Parameter types

Runbook Automation supports multiple parameter types. You can select parameter type when you create or modify a runbook parameter in the runbook editor, or when you create or modify an automation parameter in the edit automation dialog.

Depending on the type of an automation, certain parameter limitations might apply. Supported parameter types are string, integer, Boolean, and array.

String

When defining a parameter of type string, an operator running your runbook has a free text input element to enter a parameter value. You can specify the minimum or maximum number of characters that the operator can use. You can also mark a string parameter as a password so that any input that is entered by the operator is not displayed.

Any runbook or automation parameter that is created before June 2021 is of type string.

Integer

When defining a parameter of type integer, an operator running your runbook has an integer input element to enter a parameter value.

You can specify the minimum or maximum value for the integer value.

Boolean

When defining a parameter of type Boolean, an operator running your runbook has a toggle element to enter a parameter value.

Array

When defining a parameter of type array, an operator running your runbook has an input element to define a various number of inputs. The array parameter must define what type of inputs are allowed. You can use an array of either strings, integers, or Booleans.

Enumerations

To restrict the input for a specific parameter to a discrete set of values, you can extend the parameters with an optional enumeration list. Enumeration support is available for parameters of the following types:
  • string
  • integer
  • arrays with string or integer as their item type
You can define any number of allowed discrete values for your enumeration. The user will then be given the choice of selecting any one of them in the Runbook Automation UI, or multiples of those in the case of an array parameter. If a user tries to send a value which is not part of the enumeration, for example via an API call, the action is rejected with an error message.

Additionally, you can assign labels for any or all of the values of an enumeration for integer or string parameters. Labels are optional. If a label is present, the label is displayed in the Runbook Automation UI together with the value.

Example: If you are writing an application which accepts the days of the week as numeric values from 0-6, you can define the following enumeration list with labels:
Table 1. Enumeration list with labels
Value Label
0 Monday
1 Tuesday
2 Wednesday
3 Thursday
4 Friday
5 Saturday
6 Sunday
This way, the user can only choose a valid value (0-6), but is also shown the appropriate meaning of the value, as presented by the label.

Automation parameter support

The following table contains details about the parameter type to use for each type of automation.
Table 2. Parameter types
Automation type String Integer Boolean Array
Script/Bash String value is exported as a variable. Integer value is exported as a variable. Boolean is exported as variable with either value true or value false. Not supported
Script/Powershell String value is available as a variable of type System.String. Integer value is available as a variable of type System.Int32. Boolean value is available as a variable of type System.Boolean. Array variable is available as a variable of type System.Array.
HTTP String value is substituted where ever the parameter name occurs in HTTP automation API endpoint, credentials, or body. Integer value is substituted where ever the parameter name occurs in HTTP automation API endpoint, credentials, or body. Not supported Not supported
AnsibleĀ® Ansible parameters extra variables, limit, tags, skip tags, job type and all survey parameters of type text, password, or multiple choice are harvested as string parameters. Ansible parameters verbosity, inventory, credentials, and all survey parameters of type integer are harvested as integer parameter types. Ansible parameter diff mode is harvested as Boolean parameter type. Survey parameters of type multiselect are harvested as an array parameter type.