terminateServiceJobs

Terminates up to 50 service jobs in a job queue. This is a bulk version of TerminateServiceJob.

Batch reports the result for each service job individually in the response. Service jobs that were processed successfully are reported in the successful list. Service jobs that encountered errors are reported in the errors list. The response returns an HTTP status code of 200 even when some service jobs encountered errors, so check the errors list. Service jobs that can't be found are treated as successfully processed.

Samples

// This example terminates the specified service jobs with a reason.
val resp = batchClient.terminateServiceJobs {
    jobs = listOf<String>(
        "a4d6c728-8ee8-4c65-8e2a-9a5e8f4b7c3d",
        "b3d0f26e-6d3a-4a5b-9c2e-7f4a1b2c3d4e"
    )
    reason = "Job terminated by user request"
}