v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1465378349.0 KB

Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee that a step will be canceled, even if the request is successfully submitted. When you use Amazon EMR releases 5.28.0 and later, you can cancel steps that are in a <code>PENDING</code> or <code>RUNNING</code> state. In earlier versions of Amazon EMR, you can only cancel steps that are in a <code>PENDING</code> state.

post/#X-Amz-Target=ElasticMapReduce.CancelSteps

Headers

X-Amz-Target'ElasticMapReduce.CancelSteps' required

Request body

ClusterIdstring required

The <code>ClusterID</code> for the specified steps that will be canceled. Use <a>RunJobFlow</a> and <a>ListClusters</a> to get ClusterIDs.

StepIdsXmlStringMaxLen256[] required

The list of <code>StepIDs</code> to cancel. Use <a>ListSteps</a> to get steps and their states for the specified cluster.

StepCancellationOption'SEND_INTERRUPT' | 'TERMINATE_PROCESS'

The option to choose to cancel <code>RUNNING</code> steps. By default, the value is <code>SEND_INTERRUPT</code>.

Response

Success