Method: projects.locations.batchPredictionJobs.cancel

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use JobService.GetBatchPredictionJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its BatchPredictionJob.state is set to CANCELLED. Any files already outputted by the job are not deleted.

HTTP request

POST https://{service-endpoint}/v1beta1/{name}:cancel

Where {service-endpoint} is one of the supported service endpoints.

Path parameters



Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batchPredictionJob}

Request body

The request body must be empty.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:


For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • aiplatform.batchPredictionJobs.cancel

For more information, see the IAM documentation.