All Products
Search
Document Center

Batch Compute:changeJobPriority

Last Updated:May 11, 2018

Method description

Changes priority of a job.

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

Parameter description

Parameter Type Description
jobId String Job ID
priority int Priority of a job. The value is an integer ranging from 0 to 1000. Priority increases with the value.

Response description

  • If modification succeeds, a ChangeJobResponse instance is returned.

  • If modification fails, a ClientException is thrown.

Sample code

  1. try{
  2. ChangeJobResponse response = client.changeJobPriority("job-0101010299123",2);
  3. //Modification succeeded
  4. }catch(ClientException e){
  5. e.printStackTrace();
  6. //Modification failed
  7. }