Action-specific settings can be stored in environment variables. Since you can have multiple runbooks using the same action application, environment variables are great for storing values that are specific to an action instance (E.g. cluster names, specific queries, service names, IDs).
Environment variables are stored encrypted-at-rest.
You can define an environment variable schema at Settings > App Info > Environment variables schema. Environment variables values are set when you add an action to a runbook step.
Environment variable names must be strings (case-sensitive), with the following restrictions:
Environment variable values can be any valid string, number, or boolean. There are no length or character restrictions. If left blank, they will default to null
.
Here is how you can access the environment variables for an action in your code:
env.get("stringKey")
// => "stringValue"
env.get("numberKey")
// => 88888
env.get("booleanKey")
// => True
env.get("unsetKey")
// => null
env.get("undefinedKey")
// => exception
Please see the Python operation documentation for information on programmatically accessing environment variables.