All Products
Search
Document Center

Batch Compute:stop_job

Last Updated:May 14, 2018

Description

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

Parameter description

Attribute Type Description
job CreateResponse, str Job ID

Response description

The stop_job method returns an ActionResponse object. ActionResponse provides only two attributes: request ID and status code.

Example

  1. try:
  2. # Get a Client object.
  3. client = Client(...
  4. ...
  5. # Job ID.
  6. job = "job-xxxx"
  7. res = client.stop_job(job)
  8. print (res.RequestId)
  9. except ClientError, e:
  10. print(e)