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
try{StopJobResponse response = client.stopJob("job-0101010299123");//Succeeded}catch(ClientException e){e.printStackTrace();//Failed}