Cancel Running Job
A 3-step recipe with Google Cloud Dataflow. We can help you get access.
Recipe · 3 steps
Cancel Running Job
Confirm running, request cancel, and poll until JOB_STATE_CANCELLED.
- Read the job and confirm it is currently in the JOB_STATE_RUNNING state before requesting cancellation.
- Update the job's requested state to JOB_STATE_CANCELLED to immediately stop the pipeline and discard in-flight work.
- Poll the job until it reports the terminal JOB_STATE_CANCELLED state, retrying while it is still cancelling.
What you'll need to have ready
- accessToken: Google Cloud OAuth 2.0 access token used as a Bearer credential.
- projectId: The Google Cloud project id that owns the job.
- location: The regional endpoint that contains the job (e.g. us-central1).
- jobId: The id of the running job to cancel.
For your developer
Arazzo workflow google-cloud-dataflow:cancel-running-job, 3 operations: getLocationJob → updateLocationJob → getLocationJob. Specs on APIs.io.