code: public void terminate(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions) {
          terminateWithServiceResponseAsync(jobId, taskId, taskTerminateOptions).toBlocking().single().body();
      }
docs: Terminates the specified task.
  When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
  
  @param jobId The ID of the job containing the task.
  @param taskId The ID of the task to terminate.
  @param taskTerminateOptions Additional parameters for the operation
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws BatchErrorException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent