14.19. Jobs Cancel RPC

Requests cancellation of a pending or running job by its identifier.

rpc Cancel (JobsCancelRequest) returns (JobsCancelResponse)

14.19.1. Messages

  • JobsCancelRequest

  • JobsCancelResponse


14.20. JobsCancelRequest

message JobsCancelRequest {
  RequestHeader header = 1;
  Identifier job_id = 2;
  string reason = 3;
}

14.20.1. Properties

14.20.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.

14.20.1.3. reason

type: string

Message to describe the reason(s) the job was cancelled.


14.21. 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.

14.21.1. Properties

14.21.1.1. header

type: message

Standard RPC response header.

See ResponseHeader for details.

14.21.1.2. job_id

type: message

Unique identifier of the job.

See Identifier for details.

14.21.1.3. job_state

type: enum

Enumeration value representing the current state of the job.

See JobState for additional details.

14.21.1.4. job_status

type: message

Enumeration value representing the current status of the job.

See JobStatus for additional details.