17.30. Jobs Cancel RPC¶
Requests cancellation of a pending or running job by its identifier.
rpc Cancel (JobsCancelRequest) returns (JobsCancelResponse)
17.30.1. Messages¶
- JobsCancelRequest
- JobsCancelResponse
17.31. JobsCancelRequest¶
message JobsCancelRequest { RequestHeader header = 1; Identifier job_id = 2; string reason = 3; }
17.31.1. Properties¶
17.31.1.2. job_id¶
type: message
Unique identifier of the job to cancel.
Required. If the identifier value is omitted from the request or does not match any known job identifier, Clara Deploy SDK will be unable to fulfill the request.
See Identifier for details.
17.32. JobsCancelResponse¶
message JobCancelResponse { ResponseHeader header = 1; Identifier job_id = 2; JobState job_state = 3; JobStatus job_status = 4; }
Clara Deploy SDK Jobs service will respond to any cancellation request with a JobsCancelResponse
message. Requestors can use the response message to determine the result of their request.
Requestors can determine the current state of job by examining the job_state
and job_status
values.
For example, if job_state
is JOB_STATE_STOPPED
and job_status
is JOB_STATUS_HEALTHY
the requestor can safely assume the job completed correctly.