**Full name**: 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 `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/projects.locations.batchPredictionJobs/get#google.cloud.aiplatform.v1.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 `https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/projects.locations.batchPredictionJobs#BatchPredictionJob.FIELDS.state` is set to `CANCELLED`. Any files already outputted by the job are not deleted.

### Endpoint

post `https://{service-endpoint}/v1/{name}:cancel`   
Where `{service-endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest#rest_endpoints).

### Path parameters

`name` `string` 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 an empty JSON object.

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `aiplatform.batchPredictionJobs.cancel`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).