All Products
Search
Document Center

stopJob

Last Updated: May 11, 2018

Method description

Stops a job by specifying the job ID.

Note: This API can be called only when the job is in Waiting or Running state.

Parameter description

Parameter Type Description
jobId String Job ID

Response description

  • If the job is successfully stopped, a StopJobResponse instance is returned.

  • If the job fails to be stopped, a ClientException is thrown.

Sample code

  1. try{
  2. StopJobResponse response = client.stopJob("job-0101010299123");
  3. //Succeeded
  4. }catch(ClientException e){
  5. e.printStackTrace();
  6. //Failed
  7. }