Code Engine Notification Template
IBM Cloud Code Engine is a serverless platform that runs your containerized workloads, including web apps, micro-services, event-driven functions, or batch jobs. Code Engine represents a service destination, where an incoming notification can be consumed programmatically. For example, an incoming notification about an event can trigger a Code Engine destination to a backend microservice to act based on the content of the incoming notification.
For more information on the Code Engine destination, see Code Engine.
Constructing a Code Engine notification template
Construct the template block. Make sure the template is a well-formed JSON that adheres to the Handlebars template syntax and semantics.
Handlebars is a templating language that allows for dynamic content generation within templates.Handlebars can be used to customize notification messages using template variables and conditional logic.
Code Engine notification template examples
Template examples for Code Engine Jobs
{
"run_env_variables": [
{ "name": "region", "value": "{{data.region}}","type": "literal"},
]
}
See Create a Job Run to find more parameters that you can integrate into the template.
Template examples for Code Engine Functions/Applications:
For function and application templates, you can define them as per your requirement.