public final Job cancelJob(String projectId, String region, String jobId) {

    CancelJobRequest request =
        CancelJobRequest.newBuilder()
            .setProjectId(projectId)
            .setRegion(region)
            .setJobId(jobId)
            .build();
    return cancelJob(request);
  }
public final Job cancelJob ( String projectId , String region , String jobId ) { CancelJobRequest request = CancelJobRequest . newBuilder ( ) . setProjectId ( projectId ) . setRegion ( region ) . setJobId ( jobId ) . build ( ) ; return cancelJob ( request ) ; }
Starts a job cancellation request. To access the job resource after cancellation, call
[regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) or
[regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).

<p>Sample code:

<pre><code>
try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
String projectId = "";
String region = "";
String jobId = "";
Job response = jobControllerClient.cancelJob(projectId, region, jobId);
}
</code></pre>

@param projectId Required. The ID of the Google Cloud Platform project that the job belongs to.
@param region Required. The Cloud Dataproc region in which to handle the request.
@param jobId Required. The job ID.
@throws com.google.api.gax.rpc.ApiException if the remote call fails