Cancel
The PUT/api/compute/execution/{executionId}/cancel
endpoint can be used to cancel an execution.
Click to show example commands to cancel the engine execution
projectId="<replacewithprojectid>"
openapikey="<replacewithopenapikey>"
executionId="<replacewithexecutionid>"
# cancel the execution
curl -L -X PUT "https://api.mike-cloud-test.com/api/compute/execution/$executionId/cancel" \
-H 'api-version: 2' \
-H 'dhi-service-id: engine' \
-H "dhi-project-id: $projectId" \
-H "dhi-open-api-key: $openapikey" \
-H 'Content-Length: 0'
await computeClient.CancelExecutionAsync(projectId, executionId);
For now, if things go well, an empty response will be returned:
{}
Only active executions can be cancelled (obvious, but important). It is important to understand this is a "soft" cancellation. Logs from the engine will be available. Run is terminated after three minutes if engine don't respond to the cancellation request. Engine logs can't be uploaded in this case.