Terminates the execution of a code block.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CancelSparkStatement

The operation that you want to perform. Set the value to CancelSparkStatement.

JobId String Yes j202106071620hangzhou00000000001

The unique ID of the Spark job.

StatementId String Yes 1

The unique ID of the code block in the Spark job.

Response parameters

Parameter Type Example Description
Data String true

Indicates whether the code block is successfully executed.

RequestId String 4BC96729-4670-4270-B08B-20C510C615E2

The unique ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

  "RequestId": "4BC96729-4670-4270-B08B-20C510C615E2",
  "Data": 2

Error codes

For a list of error codes, visit the API Error Center.

This operation is asynchronous. If true is returned, the Spark job receives the termination instruction and attempts to terminate the code block. The termination result depends on the actual execution.

You can call the GetSparkStatement operation to check whether the code block is terminated.