Add a Webhook
Webhooks can be attached to cloud rules as either a pre-rule or a post-rule. Pre-rule webhooks run before AWS CloudFormations. Post-rule webhooks run after AWS CloudFormations.
To create a webhook in Kion:
- In the left navigation menu, click Cloud Management > Webhooks.
- Click Add New.
- Enter a name to identify the webhook throughout the application.
- Enter a description for the webhook.
- To send an IAM access key ID, secret, and session token that is good for one hour, enable the Send Access Keys checkbox.
- If you would like to skip SSL validation, enable the Skip SSL Validation checkbox.
- In the Timeout in Seconds field, enter how long the application should wait in seconds before timing out and continuing execution.
If this webhook is assigned as a pre-rule webhook in a cloud rule, the AWS CloudFormations will wait for either a success callback from the webhook or for the timeout to be reached. If the timeout is set to zero, the webhook will not wait for a callback.
- In the Callout URL field, enter in the URL of the service you set up that will handle the webhook call.
- Click Add Supported Parameters to URL to append the supported parameters to the Callout URL..
When a webhook is triggered, Kion generates values for these parameters and replaces them automatically. You may specify your own values for the parameters once they have been appended. You can also remove any parameter you don’t want to send.
- The Request Method can be either GET or POST.
- If POST is selected, the Request Body field becomes available. This is a JSON-formatted HTTP payload that contains the supported parameters by default. You can replace parameter values, delete parameters, and add your own JSON fields.
- Click Test Webhook to send a test response to the webhook to ensure it is listening.
- In the Owners dropdown menus, select users and user groups to have access to modify this webhook once it is created. They will also receive any error notifications when a webhook fails to run.
- Click Create Webhook.
You can now attach this webhook to a cloud rule to apply it to OUs or projects. For more information, see Create a Cloud Rule.