Terminates up to 50 service jobs in a job queue¶
Description¶
Terminates up to 50 service jobs in a job queue. This is a bulk version of terminate_service_job.
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.
This operation requires batch:TerminateServiceJob permission for each service job in the request. There is no separate batch:TerminateServiceJobs IAM action. If a caller's IAM policy grants batch:TerminateServiceJob, they can use both the singular terminate_service_job and bulk terminate_service_jobs operations.
Usage¶
Arguments¶
jobs
[required] An array of up to 50 service job IDs of the service jobs to terminate.
reason
[required] A message to attach to the service job that explains the reason for terminating it. This message is returned by describe_service_job operations on the service job.
Value¶
A list with the following syntax:
list(
successful = list(
"string"
),
errors = list(
list(
job = "string",
code = "string",
message = "string"
)
)
)