Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class CancelStepsCommandProtected

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 PENDING or RUNNING state. In earlier versions of Amazon EMR, you can only cancel steps that are in a PENDING state.

Example

Use a bare-bones client and the command you need to make an API call.

import { EMRClient, CancelStepsCommand } from "@aws-sdk/client-emr"; // ES Modules import
// const { EMRClient, CancelStepsCommand } = require("@aws-sdk/client-emr"); // CommonJS import
const client = new EMRClient(config);
const input = { // CancelStepsInput
ClusterId: "STRING_VALUE", // required
StepIds: [ // StepIdsList // required
"STRING_VALUE",
],
StepCancellationOption: "SEND_INTERRUPT" || "TERMINATE_PROCESS",
};
const command = new CancelStepsCommand(input);
const response = await client.send(command);
// { // CancelStepsOutput
// CancelStepsInfoList: [ // CancelStepsInfoList
// { // CancelStepsInfo
// StepId: "STRING_VALUE",
// Status: "SUBMITTED" || "FAILED",
// Reason: "STRING_VALUE",
// },
// ],
// };

Param

CancelStepsCommandInput

Returns

CancelStepsCommandOutput

See

Throws

InternalServerError (server fault)

Indicates that an error occurred while processing the request and that the request was not completed.

Throws

InvalidRequestException (client fault)

This exception occurs when there is something wrong with user input.

Throws

EMRServiceException

Base exception class for all service exceptions from EMR service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods