The HTTP Trigger is to execute an operation job by sending an HTTP POST request to designated URL, which was specified by Cloud Automator.
The benefit of this feature is user can execute the job very easily.
HTTP Tigger does not require to specify conditions when creating a job.
The URL and access token will be issued after creating job using HTTP Trigger. You can check at job detail page.
The job is executed by sending a POST request to the specified URL with an access token in the Authorization header.
As shown in the execution sample, you can send an HTTP POST request from curl command so you can use this feature by integrating with other system, like SQS Trigger.
- Here, the example shows how to register an operation job to start EC2 instance in the test environment by using HTTP Trigger.
- Select the group which job will be associated
- Select "HTTP Trigger" from the Trigger selection
- Select the execution action
- Select the target AWS account which action will be executed
- Select the method of specifying the action parameters. For the detail, please see here.
- If you selected "Specifiyng parameters before job creation" in the previous step, please configure action parameters.
- Select post-processing when the job succeed/fail.
- Enter name of the job then click "Confirm" to generate the job.
- Once job creation is completed successfully, the detail screen of the created operation job will be opened.
- You can confirm that the necessary information for HTTP request is displayed.
- Access to operation job detail screen
- The execution sample by the curl command is showing so copy and execute the job.
$ curl https://manager.cloudautomator.com/trigger/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
> -X POST \
> -H "Authorization: CAAuth xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
> -H "Content-Length: 0"
- Verify job's execution log.
- Verify most recent log detail.
- Verify log status
About POST request response
When executing POST request, be sure to check the status code of response and the response body to make sure that job exectuion has started.
When successful (job execution has started)
If the request is successful and job exection started, tge status code of "200" is retured and following response body in JSON is returned.
※ The "trigger_job_id" value is actually the ID of the job which started its execution
When failed (job execution has not started)
If the request has failed and the job execution didn't start, the status code value of "500", "503" or "404" (other than "200") will be returned.
When status code was "5xx", please wait a little and try again.
When status code was "4xx", please check URL and access token value are correct.
If there is a possibleility that the URL and access token were compromised, you can change the URL and access token to different values by using "Update" botton in the operaetion job detail screen.