Stay organized with collections
Save and categorize content based on your preferences.
Full name: projects.locations.tuningJobs.cancel
Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use GenAiTuningService.GetTuningJob or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a TuningJob.error value with a google.rpc.Status.code of 1, corresponding to code.CANCELLED, and TuningJob.state is set to CANCELLED.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[],[],null,["# Method: tuningJobs.cancel\n\n**Full name**: projects.locations.tuningJobs.cancel\n\nCancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [GenAiTuningService.GetTuningJob](/vertex-ai/docs/reference/rest/v1/projects.locations.tuningJobs/get#google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob) or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a [TuningJob.error](/vertex-ai/docs/reference/rest/v1/projects.locations.tuningJobs#TuningJob.FIELDS.error) value with a [google.rpc.Status.code](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Status.FIELDS.code) of 1, corresponding to `code.CANCELLED`, and [TuningJob.state](/vertex-ai/docs/reference/rest/v1/projects.locations.tuningJobs#TuningJob.FIELDS.state) is set to `CANCELLED`. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1``/{name}:cancel` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`name` `string` \nRequired. The name of the TuningJob to cancel. Format: `projects/{project}/locations/{location}/tuningJobs/{tuningJob}`\n\n### Request body\n\nThe request body must be empty. \n\n### Response body\n\nIf successful, the response body is an empty JSON object."]]