Cancel a dataflow job in Google Cloud Platform (GCP)
Google Cloud Dataflow is data processing service that can be used for streaming and batch applications. Users can setup pipelines in Dataflow to integrate and process large datasets.
With pub/sub, users can setup dataflow pipelines to write messages from a pub/sub topic or subscription to a BigQuery table.
IoT Cloud Tester application provides an easy interface to cancel a dataflow job in Google Cloud Platform.
To cancel a dataflow job in Google Cloud,
- Get the list of dataflow jobs by clicking 'List Jobs' in the 'Dataflow' tab.
- Select a job and press 'Cancel Job'
A PUT request is sent to GCP to cancel the dataflow job. The job ID and the requested state is sent as JSON data.
PUT https://dataflow.googleapis.com/v1b3/projects/second-inquiry-315605/locations/asia-east1/jobs/2021-08-08_08_10_53-4543477010421041882 HTTP/1.1
{"requestedState":"JOB_STATE_CANCELLED","id":"2021-08-08_08_10_53-4543477010421041882"}